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));
}[...]