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
0dc124d3
Commit
0dc124d3
authored
Sep 19, 2012
by
Dayle Rees
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1210 from franzliedke/patch-44
Definition list support (#1202)
parents
99d710a8
65d4b244
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
laravel/documentation/views/html.md
+2
-0
laravel/html.php
+22
-0
No files found.
laravel/documentation/views/html.md
View file @
0dc124d3
...
...
@@ -119,6 +119,8 @@ The "mailto" method on the HTML class obfuscates the given e-mail address so it
echo HTML::ol(array('Get Peanut Butter', 'Get Chocolate', 'Feast'));
echo HTML::ul(array('Ubuntu', 'Snow Leopard', 'Windows'));
echo HTML::dl(array('Ubuntu' => 'An operating system by Canonical', 'Windows' => 'An operating system by Microsoft'));
<a
name=
"custom-macros"
></a>
## Custom Macros
...
...
laravel/html.php
View file @
0dc124d3
...
...
@@ -347,6 +347,28 @@ class HTML {
return
'<'
.
$type
.
static
::
attributes
(
$attributes
)
.
'>'
.
$html
.
'</'
.
$type
.
'>'
;
}
/**
* Generate a definition list.
*
* @param array $list
* @param array $attributes
* @return string
*/
public
static
function
dl
(
$list
,
$attributes
=
array
())
{
$html
=
''
;
if
(
count
(
$list
)
==
0
)
return
$html
;
foreach
(
$list
as
$term
=>
$description
)
{
$html
.=
'<dt>'
.
static
::
entities
(
$term
)
.
'</dt>'
;
$html
.=
'<dd>'
.
static
::
entities
(
$description
)
.
'</dd>'
;
}
return
'<dl'
.
static
::
attributes
(
$attributes
)
.
'>'
.
$html
.
'</dl>'
;
}
/**
* Build a list of HTML attributes from an array.
...
...
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