Difference between #1 and #2 of
Yii 1.1: Cgridview: Use Special Variable $Data In The Options Of A Button (I.e. Evaluate Options Attribute)

Changes

Title unchanged

Yii 1.1: Cgridview: Use Special Variable $Data In The Options Of A Button (I.e. Evaluate Options Attribute)

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

CGridView, CButtonColumn, ButtonColumn, form, inputevaluate, htmlOptions, understanding

Content changed

[...]
$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));
}
[...]
3 0
4 followers
Viewed: 23 197 times
Version: 1.1
Category: Tutorials
Written by: Louis Gac
Last updated by: Louis Gac
Created on: Jun 17, 2014
Last updated: 10 years ago
Update Article

Revisions

View all history