Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
c3df0bee
Commit
c3df0bee
authored
Jul 07, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed parameter ordering.
parent
2356e933
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Html.php
framework/yii/helpers/base/Html.php
+3
-3
HtmlTest.php
tests/unit/framework/helpers/HtmlTest.php
+2
-2
No files found.
framework/yii/helpers/base/Html.php
View file @
c3df0bee
...
...
@@ -855,7 +855,7 @@ class Html
* The signature of this callback must be:
*
* ~~~
* function ($i
ndex, $item
)
* function ($i
tem, $index
)
* ~~~
*
* where $index is the array key corresponding to `$item` in `$items`. The callback should return
...
...
@@ -876,7 +876,7 @@ class Html
$results
=
array
();
foreach
(
$items
as
$index
=>
$item
)
{
if
(
$formatter
!==
null
)
{
$results
[]
=
call_user_func
(
$formatter
,
$i
ndex
,
$item
);
$results
[]
=
call_user_func
(
$formatter
,
$i
tem
,
$index
);
}
else
{
$results
[]
=
static
::
tag
(
'li'
,
$encode
?
static
::
encode
(
$item
)
:
$item
,
$itemOptions
);
}
...
...
@@ -897,7 +897,7 @@ class Html
* The signature of this callback must be:
*
* ~~~
* function ($i
ndex, $item
)
* function ($i
tem, $index
)
* ~~~
*
* where $index is the array key corresponding to `$item` in `$items`. The callback should return
...
...
tests/unit/framework/helpers/HtmlTest.php
View file @
c3df0bee
...
...
@@ -388,7 +388,7 @@ EOD;
EOD;
$this
->
assertEqualsWithoutLE
(
$expected
,
Html
::
ul
(
$data
,
array
(
'class'
=>
'test'
,
'item'
=>
function
(
$i
ndex
,
$item
)
{
'item'
=>
function
(
$i
tem
,
$index
)
{
return
"<li class=
\"
item-
$index
\"
>
$item
</li>"
;
}
)));
...
...
@@ -418,7 +418,7 @@ EOD;
EOD;
$this
->
assertEqualsWithoutLE
(
$expected
,
Html
::
ol
(
$data
,
array
(
'class'
=>
'test'
,
'item'
=>
function
(
$i
ndex
,
$item
)
{
'item'
=>
function
(
$i
tem
,
$index
)
{
return
"<li class=
\"
item-
$index
\"
>
$item
</li>"
;
}
)));
...
...
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