34k+
News
Guide
API
Wiki
Forum
Community
Places
Members
Hall of Fame
Badges
More
Learn
Books
Resources
Develop
Download Yii
Extensions
Report an Issue
Report a Security Issue
Contribute to Yii
Donate
About
Release Cycle
License
Team
Official Logos and Design
Login
Yii 1.1: Cgridview: Use Special Variable $Data In The Options Of A Button (I.e. Evaluate Options Attribute)
Comparing
#1
with
#2
Revision #2 was created by
Louis Gac
on Jul 2, 2014, 4:46:49 PM.
added isset in condition to avoid php notice when evaluateOptions is not used
« Previous (#1)
Content
[...]
$options=isset($button['options']) ? $button['options'] : array();
if(!isset($options['title']))
$options['title']=$label;
// Start of modification
if(
isset (
$options['evaluateOptions']
)
)
{
foreach( $options['evaluateOptions'] as $key=>$value)
{
$options[$value] = $this->evaluateExpression($options[$value],array('data'=>$data,'row'=>$row));
}
[...]