I would like to set the CButtonColumn imageButtons to reflect to ALL instances. I tried a ‘WidgetFactory’ thing in the main.php config file, but it didn’t work. I think it didn’t go in the right place and I have no idea where to put it.
Can anyone help? Thanks
CButtonColumn is not a widget… so you cannot set it in the config…
Maybe the subclassing of CButtonColumn can help you :
class CustomButtonColumn extends CButtonColumn { public function init() { $this->deleteButtonImageUrl=Yii::app()->request->baseUrl.'/images/delete.gif'; $this->updateButtonImageUrl=Yii::app()->request->baseUrl.'/images/update.gif'; $this->viewButtonImageUrl=Yii::app()->request->baseUrl.'/images/view.gif'; return parent::init(); } }