/** * Generates the index file for the admin interface. */ public function indexAction() { $cssHeader = ''; $abslen = strlen(PATH_site); $langid = $this->getContext()->getLocale()->getLanguageId(); $controller = $this->getController(); foreach (Base::getAimeos()->getCustomPaths('client/extjs') as $base => $paths) { $relJsbPath = '../' . substr($base, $abslen); foreach ($paths as $path) { $jsbAbsPath = $base . '/' . $path; if (!is_file($jsbAbsPath)) { throw new \Exception(sprintf('JSB2 file "%1$s" not found', $jsbAbsPath)); } $jsb2 = new \MW_Jsb2_Default($jsbAbsPath, $relJsbPath . '/' . dirname($path)); $cssHeader .= $jsb2->getHtml('css'); } } // rawurldecode() is necessary for ExtJS templates to replace "{site}" properly $urlTemplate = rawurldecode(BackendUtility::getModuleUrl($this->request->getPluginName(), array('tx_aimeos_web_aimeostxaimeosadmin' => array('site' => '{site}', 'tab' => '{tab}')))); $serviceUrl = BackendUtility::getModuleUrl($this->request->getPluginName(), array('tx_aimeos_web_aimeostxaimeosadmin' => array('controller' => 'Admin', 'action' => 'do'))); $this->view->assign('cssHeader', $cssHeader); $this->view->assign('lang', $langid); $this->view->assign('i18nContent', $this->getJsonClientI18n($langid)); $this->view->assign('config', $this->getJsonClientConfig()); $this->view->assign('site', $this->getSite($this->request)); $this->view->assign('smd', $controller->getJsonSmd($serviceUrl)); $this->view->assign('itemSchemas', $controller->getJsonItemSchemas()); $this->view->assign('searchSchemas', $controller->getJsonSearchSchemas()); $this->view->assign('activeTab', $this->request->hasArgument('tab') ? (int) $this->request->getArgument('tab') : 0); $this->view->assign('version', $this->getVersion()); $this->view->assign('urlTemplate', $urlTemplate); }