public function actionIndex() { // register auth token $this->view->registerJs("var authToken='" . Yii::$app->adminuser->identity->authToken . "';", \luya\web\View::POS_HEAD); $this->view->registerJs("var homeUrl='" . Url::home(true) . "';", \luya\web\View::POS_HEAD); // register admin js translations from module $this->view->registerJs('var i18n=' . Json::encode($this->module->jsTranslations), \luya\web\View::POS_HEAD); // Init ElementQueries after page load // $this->view->registerJs('setTimeout( function() {ElementQueries.listen(); ElementQueries.init();}, 1500);', \luya\web\View::POS_LOAD); // return and render index view file return $this->render('index'); }