public function setCaption($caption) { if ($this->addCaption === null) { $this->addCaption = $this->widget('ObjectSettingWidget', array(), true); } parent::setCaption($this->addCaption . str_replace($this->addCaption, '', $caption)); // придумать более красивый способ }
public function init() { parent::init(); $this->module->setImport(array('backend.controllers.*')); }
public function actions() { return array_merge(parent::actions(), array('fileUpload' => array('class' => 'fileUpload.FileUploadAction', 'multiple' => false, 'createThumb' => true, 'thumbConfig' => array('width' => 70, 'height' => 50, 'crop' => 'top', 'postfix' => '_da')), 'listFileUpload' => array('class' => 'fileUpload.FileUploadAction', 'multiple' => true, 'createThumb' => true, 'rewriteIfFileExist' => false, 'thumbConfig' => array('width' => 70, 'height' => 50, 'crop' => 'top', 'postfix' => '_da')))); }