Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
UserAdminV2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
庄欣
UserAdminV2
Commits
01f83234
Commit
01f83234
authored
Jul 31, 2012
by
Dayle Rees
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #945 from cviebrock/html-link
Allow second param of HTML::link* methods to be null
parents
2611c1f2
4d44df48
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
laravel/html.php
+8
-6
No files found.
laravel/html.php
View file @
01f83234
...
@@ -137,10 +137,12 @@ class HTML {
...
@@ -137,10 +137,12 @@ class HTML {
* @param bool $https
* @param bool $https
* @return string
* @return string
*/
*/
public
static
function
link
(
$url
,
$title
,
$attributes
=
array
(),
$https
=
null
)
public
static
function
link
(
$url
,
$title
=
null
,
$attributes
=
array
(),
$https
=
null
)
{
{
$url
=
URL
::
to
(
$url
,
$https
);
$url
=
URL
::
to
(
$url
,
$https
);
if
(
is_null
(
$title
))
$title
=
$url
;
return
'<a href="'
.
$url
.
'"'
.
static
::
attributes
(
$attributes
)
.
'>'
.
static
::
entities
(
$title
)
.
'</a>'
;
return
'<a href="'
.
$url
.
'"'
.
static
::
attributes
(
$attributes
)
.
'>'
.
static
::
entities
(
$title
)
.
'</a>'
;
}
}
...
@@ -152,7 +154,7 @@ class HTML {
...
@@ -152,7 +154,7 @@ class HTML {
* @param array $attributes
* @param array $attributes
* @return string
* @return string
*/
*/
public
static
function
link_to_secure
(
$url
,
$title
,
$attributes
=
array
())
public
static
function
link_to_secure
(
$url
,
$title
=
null
,
$attributes
=
array
())
{
{
return
static
::
link
(
$url
,
$title
,
$attributes
,
true
);
return
static
::
link
(
$url
,
$title
,
$attributes
,
true
);
}
}
...
@@ -168,7 +170,7 @@ class HTML {
...
@@ -168,7 +170,7 @@ class HTML {
* @param bool $https
* @param bool $https
* @return string
* @return string
*/
*/
public
static
function
link_to_asset
(
$url
,
$title
,
$attributes
=
array
(),
$https
=
null
)
public
static
function
link_to_asset
(
$url
,
$title
=
null
,
$attributes
=
array
(),
$https
=
null
)
{
{
$url
=
URL
::
to_asset
(
$url
,
$https
);
$url
=
URL
::
to_asset
(
$url
,
$https
);
...
@@ -183,7 +185,7 @@ class HTML {
...
@@ -183,7 +185,7 @@ class HTML {
* @param array $attributes
* @param array $attributes
* @return string
* @return string
*/
*/
public
static
function
link_to_secure_asset
(
$url
,
$title
,
$attributes
=
array
())
public
static
function
link_to_secure_asset
(
$url
,
$title
=
null
,
$attributes
=
array
())
{
{
return
static
::
link_to_asset
(
$url
,
$title
,
$attributes
,
true
);
return
static
::
link_to_asset
(
$url
,
$title
,
$attributes
,
true
);
}
}
...
@@ -207,7 +209,7 @@ class HTML {
...
@@ -207,7 +209,7 @@ class HTML {
* @param array $attributes
* @param array $attributes
* @return string
* @return string
*/
*/
public
static
function
link_to_route
(
$name
,
$title
,
$parameters
=
array
(),
$attributes
=
array
())
public
static
function
link_to_route
(
$name
,
$title
=
null
,
$parameters
=
array
(),
$attributes
=
array
())
{
{
return
static
::
link
(
URL
::
to_route
(
$name
,
$parameters
),
$title
,
$attributes
);
return
static
::
link
(
URL
::
to_route
(
$name
,
$parameters
),
$title
,
$attributes
);
}
}
...
@@ -231,7 +233,7 @@ class HTML {
...
@@ -231,7 +233,7 @@ class HTML {
* @param array $attributes
* @param array $attributes
* @return string
* @return string
*/
*/
public
static
function
link_to_action
(
$action
,
$title
,
$parameters
=
array
(),
$attributes
=
array
())
public
static
function
link_to_action
(
$action
,
$title
=
null
,
$parameters
=
array
(),
$attributes
=
array
())
{
{
return
static
::
link
(
URL
::
to_action
(
$action
,
$parameters
),
$title
,
$attributes
);
return
static
::
link
(
URL
::
to_action
(
$action
,
$parameters
),
$title
,
$attributes
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment