public function beforeBootstrap() { parent::beforeBootstrap(); Util::setComponent("appUrlManager", ["class" => '\\yii\\web\\UrlManager', "scriptUrl" => \Yii::$app->getRequest()->getBaseUrl() . '/index.php']); }
public function init() { parent::init(); Util::setComponent('appUrlManager', ['enablePrettyUrl' => true, 'showScriptName' => true, 'rules' => [["class" => UrlRule::className()]]], true); }
public function initUserModule() { $boot = \Yii::createObject('\\dektrium\\user\\Bootstrap'); $boot->bootstrap(\Yii::$app); $definitions = \Yii::$app->getComponents(); $themePath = $definitions["view"]["theme"]["pathMap"][\Yii::$app->getViewPath()][0]; Util::setComponent("view", ['theme' => ['pathMap' => ["@hass/user/views" => [$themePath . "/user", "@app/views/user", "@hass/user/views", "@dektrium/user/views"]]]], true); }
public function bootstrap($app) { Util::setComponent("view", ["defaultExtension" => "twig"]); }
public function bootstrap($app) { Hook::on(\hass\system\Module::EVENT_SYSTEM_GROUPNAV, [$this, "onSetGroupNav"]); Util::setComponent("authManager", ["class" => "\\hass\\rbac\\components\\DbManager"]); Hook::on(new \hass\rbac\hooks\Permission()); }
public function registerTranslations() { Util::setComponent("i18n", ['translations' => ["hass/install" => ['class' => "\\yii\\i18n\\PhpMessageSource", 'basePath' => '@hass/install/messages']]], true); }