/** * Init module */ public function init() { if (\Yii::$app instanceof \yii\console\Application) { $this->controllerNamespace = 'simplator\\settings\\commands'; } parent::init(); }
public function init() { parent::init(); if (!$this->_storage) { die('Need set storage for medialib'); } $this->setMimetypes(['file' => ['*/*', 'asd/*']]); if (!isset($this->models['folder'])) { $this->models['folder'] = 'simplator\\medialib\\models\\Folder'; } models\Entity::$models = $this->models; // custom initialization code goes here }
public function init() { if (\Yii::$app instanceof \yii\console\Application) { $this->controllerNamespace = 'simplator\\articles\\commands'; } parent::init(); if (!count($this->_plugins)) { $this->setPlugins([]); } if (!strlen($this->title)) { $this->title = Module::t('articles', 'Articles'); } //articlesAsset::register($view)->addLanguage($this->language, 'fileinput_locale_'); $this->breadcrumbs = []; // custom initialization code goes here }
/** * Init module */ public function init() { parent::init(); }