Esempio n. 1
0
 public function init()
 {
     if ($this->submitButtonText == "") {
         $this->submitButtonText = Yii::t('WallModule.widgets_ContentFormWidget', 'Submit');
     }
     if ($this->contentContainer == null || !$this->contentContainer instanceof HActiveRecordContentContainer) {
         throw new CHttpException(500, "No Content Container given!");
     }
     return parent::init();
 }
Esempio n. 2
0
 /**
  * Initializes the navigation widget.
  * This method mainly normalizes the {@link items} property.
  * If this method is overridden, make sure the parent implementation is invoked.
  */
 public function init()
 {
     // Intercept this controller
     Yii::app()->interceptor->intercept($this);
     $this->addItemGroup(array('id' => '', 'label' => ''));
     // Fire Event
     if ($this->hasEventHandler('onInit')) {
         $this->onInit(new CEvent($this));
     }
     return parent::init();
 }
 public function __construct()
 {
     if (!isset($this->id)) {
         $this->id = '';
     }
     if (!isset($this->icon)) {
         $this->icon = '';
     }
     if (!isset($this->targets)) {
         $this->targets = false;
     }
     if (!isset($this->notemplate)) {
         $this->notemplate = 0;
     }
     if (Yii::app()->request->getParam('sguid') != '' && ($this->space = Space::model()->findByPk(Yii::app()->request->getParam('sguid'))) == null) {
         $this->space = false;
     }
     return parent::__construct();
 }
Esempio n. 4
0
 public function init()
 {
     $assetPrefix = Yii::app()->assetManager->publish(dirname(__FILE__) . '/resources', true, 0, defined('YII_DEBUG'));
     Yii::app()->clientScript->registerScriptFile($assetPrefix . '/panelMenu.js', CClientScript::POS_BEGIN);
     return parent::init();
 }