Наследование: extends CWidge\CWidget
Пример #1
0
 public function init()
 {
     if (!isset($this->controller->yupe->bootstrap)) {
         $this->controller->yupe->getComponent('bootstrap');
     }
     parent::init();
 }
Пример #2
0
 /**
  * @throws CException
  */
 public function init()
 {
     if (!$this->blog || !$this->user) {
         throw new CException(Yii::t('BlogModule.blog', 'Set "blogId" and "user" !'));
     }
     parent::init();
 }
Пример #3
0
 /**
  *
  */
 public function init()
 {
     $this->assetsUrl = Yii::app()->getAssetManager()->publish(__DIR__ . '/assets');
     Yii::app()->getClientScript()->registerScriptFile($this->assetsUrl . '/js/jquery.colorbox-min.js');
     Yii::app()->getClientScript()->registerCssFile($this->assetsUrl . '/colorbox.css');
     parent::init();
 }
Пример #4
0
 /**
  *
  */
 public function init()
 {
     $this->assetsUrl = Yii::app()->getAssetManager()->publish(__DIR__ . DIRECTORY_SEPARATOR . 'assets');
     Yii::app()->getClientScript()->registerScriptFile($this->assetsUrl . DIRECTORY_SEPARATOR . 'js' . DIRECTORY_SEPARATOR . 'jquery.colorbox-min.js');
     Yii::app()->getClientScript()->registerCssFile($this->assetsUrl . DIRECTORY_SEPARATOR . 'colorbox.css');
     parent::init();
 }
Пример #5
0
 /**
  *
  */
 public function init()
 {
     parent::init();
     $this->producerRepository = Yii::app()->getComponent('producerRepository');
     if (!$this->title) {
         $this->title = Yii::t('StoreModule.store', 'Producers list');
     }
 }
Пример #6
0
 public function init()
 {
     if (is_string($this->attribute)) {
         $this->attribute = Attribute::model()->findByAttributes(['name' => $this->attribute]);
     }
     if (!$this->attribute instanceof Attribute || $this->attribute->type != Attribute::TYPE_NUMBER) {
         throw new Exception('Атрибут не найден или неправильного типа');
     }
     parent::init();
 }
Пример #7
0
 /**
  * @throws Exception
  */
 public function init()
 {
     if (is_string($this->attribute)) {
         $this->attribute = Attribute::model()->findByAttributes(['name' => $this->attribute]);
     }
     if (!$this->attribute instanceof Attribute || !$this->attribute->isMultipleValues()) {
         throw new Exception(Yii::t('StoreModulle.store', 'Attribute error!'));
     }
     parent::init();
 }
Пример #8
0
 /**
  * @throws CException
  */
 public function init()
 {
     Yii::app()->getClientScript()->registerScriptFile(Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.modules.callback.views.web') . '/callback.js'), CClientScript::POS_END);
     parent::init();
 }
Пример #9
0
 /**
  *
  */
 public function init()
 {
     Yii::app()->getClientScript()->registerScriptFile(Yii::app()->getAssetManager()->publish(Yii::getPathOfAlias('application.modules.favorite.view.web') . '/favorite.js'), CClientScript::POS_END);
     $this->favorite = Yii::app()->getComponent('favorite');
     parent::init();
 }
Пример #10
0
 /**
  *
  */
 public function init()
 {
     $this->categoryRepository = Yii::app()->getComponent('categoryRepository');
     $this->productRepository = Yii::app()->getComponent('productRepository');
     parent::init();
 }
Пример #11
0
 /**
  *
  */
 public function init()
 {
     parent::init();
     $this->attributesRepository = new AttributesRepository();
 }