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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Rotua Panjaitan
yii2
Commits
c9e4773e
Commit
c9e4773e
authored
Nov 29, 2013
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved key serialization from data provider to data viewers.
parent
975f263e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
ActiveDataProvider.php
framework/yii/data/ActiveDataProvider.php
+2
-2
GridView.php
framework/yii/grid/GridView.php
+1
-1
ListView.php
framework/yii/widgets/ListView.php
+1
-1
No files found.
framework/yii/data/ActiveDataProvider.php
View file @
c9e4773e
...
...
@@ -138,9 +138,9 @@ class ActiveDataProvider extends BaseDataProvider
foreach
(
$models
as
$model
)
{
$kk
=
[];
foreach
(
$pks
as
$pk
)
{
$kk
[]
=
$model
[
$pk
];
$kk
[
$pk
]
=
$model
[
$pk
];
}
$keys
[]
=
json_encode
(
$kk
)
;
$keys
[]
=
$kk
;
}
}
return
$keys
;
...
...
framework/yii/grid/GridView.php
View file @
c9e4773e
...
...
@@ -373,7 +373,7 @@ class GridView extends BaseListView
}
else
{
$options
=
$this
->
rowOptions
;
}
$options
[
'data-key'
]
=
$key
;
$options
[
'data-key'
]
=
is_array
(
$key
)
?
json_encode
(
$key
)
:
$key
;
return
Html
::
tag
(
'tr'
,
implode
(
''
,
$cells
),
$options
);
}
...
...
framework/yii/widgets/ListView.php
View file @
c9e4773e
...
...
@@ -88,7 +88,7 @@ class ListView extends BaseListView
$options
=
$this
->
itemOptions
;
$tag
=
ArrayHelper
::
remove
(
$options
,
'tag'
,
'div'
);
if
(
$tag
!==
false
)
{
$options
[
'data-key'
]
=
$key
;
$options
[
'data-key'
]
=
is_array
(
$key
)
?
json_encode
(
$key
)
:
$key
;
return
Html
::
tag
(
$tag
,
$content
,
$options
);
}
else
{
return
$content
;
...
...
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