/** * Initialization * * @return void */ protected function init() { $this->backendUser = $this->getBackendUser(); $this->database = $this->getDatabaseConnection(); $excludeStatisticFolders = 0; if ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][COMMERCE_EXTKEY]['extConf']['excludeStatisticFolders'] != '') { $excludeStatisticFolders = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][COMMERCE_EXTKEY]['extConf']['excludeStatisticFolders']; } $this->statistics = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_Commerce_Utility_StatisticsUtility'); $this->statistics->init($excludeStatisticFolders); $this->extConf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][COMMERCE_EXTKEY]['extConf']; }
/** * Initialization * * @return void */ public function init() { $language = $this->getLanguageService(); $language->includeLLFile('EXT:commerce/Resources/Private/Language/locallang_mod_statistic.xml'); $language->includeLLFile('EXT:lang/locallang_mod_web_list.php'); parent::init(); $this->extConf = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][COMMERCE_EXTKEY]['extConf']; $this->excludePids = $this->extConf['excludeStatisticFolders'] != '' ? $this->extConf['excludeStatisticFolders'] : 0; $this->statistics = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_Commerce_Utility_StatisticsUtility'); $this->statistics->init($this->extConf['excludeStatisticFolders'] != '' ? $this->extConf['excludeStatisticFolders'] : 0); $this->orderPageId = current(array_unique(Tx_Commerce_Domain_Repository_FolderRepository::initFolders('Orders', 'Commerce', 0, 'Commerce'))); /** * If we get an id via GP use this, else use the default id */ $this->id = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'); if (!$this->id) { $this->id = $this->orderPageId; } $this->doc = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate'); $this->doc->backPath = $GLOBALS['BACK_PATH']; $this->doc->docType = 'xhtml_trans'; $this->doc->setModuleTemplate(PATH_TXCOMMERCE . 'Resources/Private/Backend/mod_index.html'); if (!$this->doc->moduleTemplate) { \TYPO3\CMS\Core\Utility\GeneralUtility::devLog('cannot set moduleTemplate', 'commerce', 2, array('backpath' => $this->doc->backPath, 'filename from TBE_STYLES' => $GLOBALS['TBE_STYLES']['htmlTemplates']['mod_index.html'], 'full path' => $this->doc->backPath . $GLOBALS['TBE_STYLES']['htmlTemplates']['mod_index.html'])); $templateFile = PATH_TXCOMMERCE_REL . 'Resources/Private/Backend/mod_index.html'; $this->doc->moduleTemplate = \TYPO3\CMS\Core\Utility\GeneralUtility::getURL(PATH_site . $templateFile); } $this->doc->form = '<form action="" method="POST" name="editform">'; // JavaScript $this->doc->JScode = $this->doc->wrapScriptTags(' script_ended = 0; function jumpToUrl(URL) { document.location = URL; } '); $this->doc->postCode = $this->doc->wrapScriptTags(' script_ended = 1; if (top.fsMod) { top.fsMod.recentIds["web"] = ' . (int) $this->id . '; } '); }