yiisoft/yii — pull request #1405 by resurtm (2012-09-14 13:53:33+00:00)
Title: Fixes #1391: CDetailView: callables (including anonymous functions for PHP 5.3+) could be used as value generators of the attributes.

Fixes #1391.

Testing code:
```php
widget('zii.widgets.CDetailView',array(
'data'=>TaskGroup::model()->find(array('offset'=>1)),
'attributes'=>array(
'id',
'title',
'create_time',
array(
'name'=>'update_time',
'value'=>function($data) {
return $data->id.', '.$data->title;
},
),
),
)); ?>

id.', '.$data->title;
}
}
?>

widget('zii.widgets.CDetailView',array(
'data'=>TaskGroup::model()->find(array('offset'=>1)),
'attributes'=>array(
'id',
'title',
'create_time',
array(
'name'=>'update_time',
'value'=>array('TestingClass','testingCallback'),
),
),
)); ?>
```