public function init() { if ($this->maxNews === null) { $this->maxNews = 3; } parent::init(); }
/** * Initializes the widget. */ public function init() { parent::init(); //get comments module $commentsModule = Yii::app()->getModule('comments'); //get model config for comments module $this->_config = $commentsModule->getModelConfig(); if (count($this->_config) > 0) { $this->registeredOnly = isset($this->_config['registeredOnly']) ? $this->_config['registeredOnly'] : $this->registeredOnly; $this->useCaptcha = isset($this->_config['useCaptcha']) ? $this->_config['useCaptcha'] : $this->useCaptcha; $this->postCommentAction = isset($this->_config['postCommentAction']) ? $this->_config['postCommentAction'] : $this->postCommentAction; } $this->registerScripts(); }
public function init() { parent::init(); self::$interval = (int) Yii::app()->getModule('banners')->postLoadInterval; }