luya\web\Bootstrap::run PHP Method

run() public method

Invokes the bootstraping process.
See also: luya\base\BaseBootstrap::run()
public run ( $app )
    public function run($app)
    {
        if (!$app->request->getIsConsoleRequest()) {
            if ($this->hasModule('admin') && $app->request->isAdmin()) {
                foreach ($this->getModules() as $id => $module) {
                    if ($module instanceof AdminModuleInterface) {
                        $this->_adminAssets = ArrayHelper::merge($module->getAdminAssets(), $this->_adminAssets);
                        $this->_adminMenus[$module->id] = $module->getMenu();
                        $this->_jsTranslations[$id] = $module->getJsTranslationMessages();
                    }
                }
                $app->getModule('admin')->assets = $this->_adminAssets;
                $app->getModule('admin')->controllerMap = $this->_apis;
                $app->getModule('admin')->moduleMenus = $this->_adminMenus;
                $app->getModule('admin')->setJsTranslations($this->_jsTranslations);
            }
        }
        ksort($this->_urlRules);
        foreach ($this->_urlRules as $position => $rules) {
            $app->getUrlManager()->addRules($rules);
        }
    }