/** * @inheritdoc */ public function init() { parent::init(); $this->_modulesConfigDependency = new ExpressionDependency(['expression' => '\\Yii::$app->getModulesHash()']); DbState::bootstrap(); Yii::$container->set('gromver\\modulequery\\ModuleQuery', ['cache' => $this->cache, 'cacheDependency' => new ExpressionDependency(['expression' => '\\Yii::$app->getModulesHash()'])]); }
/** * @inheritdoc */ public function init() { parent::init(); $this->trigger(self::EVENT_ON_INIT); if ($this->isDatabaseInstalled()) { $baseUrl = Setting::get('baseUrl'); Yii::setAlias("@web", $baseUrl); $this->urlManager->scriptUrl = $baseUrl; } }
/** * @inheritdoc */ public function init() { parent::init(); $this->trigger(self::EVENT_ON_INIT); if ($this->isDatabaseInstalled()) { $baseUrl = Yii::$app->settings->get('baseUrl'); if ($baseUrl !== null) { Yii::setAlias("@web", $baseUrl); $this->urlManager->scriptUrl = $baseUrl; $this->urlManager->baseUrl = $baseUrl; // Set hostInfo based on given baseUrl $urlParts = parse_url($baseUrl); $hostInfo = $urlParts['scheme'] . '://' . $urlParts['host']; if (isset($urlParts['port'])) { $hostInfo .= ':' . $urlParts['port']; } $this->urlManager->hostInfo = $hostInfo; } } }
/** * @inheritdoc */ public function init() { $this->bootstrap = array_merge($this->bootstrap, ['grom']); parent::init(); }