/** *### .init() * * Widget initialization */ public function init() { if (!$this->data instanceof CModel) { throw new CException('Property "data" should be of CModel class.'); } parent::init(); }
/** *### .init() * * Widget initialization */ public function init() { if (!$this->data instanceof CModel) { throw new CException('Property "data" should be of CModel class.'); } //set bootstrap css $this->htmlOptions = array('class' => 'table table-bordered table-striped table-hover'); //disable loading Yii's css for bootstrap $this->cssFile = false; parent::init(); }
/** *### .init() * * Widget initialization */ public function init() { if (!$this->data instanceof CModel) { throw new CException('Property "data" should be of CModel class.'); } if (!is_array($this->htmlOptions)) { $this->htmlOptions = array(); } // Default css classes $defaultClasses = 'table table-bordered table-striped table-hover'; if (!isset($this->htmlOptions['class'])) { $this->htmlOptions['class'] = $defaultClasses; } else { $this->htmlOptions['class'] .= ' ' . $defaultClasses; } $this->cssFile = false; parent::init(); }
/** * */ public function init() { parent::init(); Yii::app()->clientScript->registerCssFile(YiiEmbed::assetsUrl() . '/css/detail-view.css'); }