public function init() { parent::init(); if (\Yii::$app->cms->giiEnabled == Cms::BOOL_N) { $this->allowedIPs = [""]; } else { //TODO:add merge settings $this->allowedIPs = explode(",", \Yii::$app->cms->giiAllowedIPs); } $class = new \ReflectionClass(\yii\gii\Module::className()); $dir = dirname($class->getFileName()); $this->setBasePath($dir); }
/** * @inheritdoc */ public function init() { parent::init(); $this->setBasePath('@vendor/yiisoft/yii2-gii'); }
public function init() { $this->controllerNamespace = 'yii\\gii\\controllers'; parent::init(); }
public function init() { parent::init(); }