예제 #1
0
 /**
  * Initialization.
  *
  * @return void
  */
 protected function init()
 {
     $excludeStatisticFolders = 0;
     if (SettingsFactory::getInstance()->getExtConf('excludeStatisticFolders') != '') {
         $excludeStatisticFolders = SettingsFactory::getInstance()->getExtConf('excludeStatisticFolders');
     }
     $this->statistics = GeneralUtility::makeInstance('CommerceTeam\\Commerce\\Utility\\StatisticsUtility');
     $this->statistics->init($excludeStatisticFolders);
 }
 /**
  * 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');
     $this->MCONF = $GLOBALS['MCONF'];
     parent::init();
     $this->statistics = GeneralUtility::makeInstance('CommerceTeam\\Commerce\\Utility\\StatisticsUtility');
     $this->statistics->init((int) SettingsFactory::getInstance()->getExtConf('excludeStatisticFolders'));
     $this->orderPageId = current(array_unique(\CommerceTeam\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) GeneralUtility::_GP('id');
     if (!$this->id) {
         $this->id = $this->orderPageId;
     }
     $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
     $this->doc->backPath = $this->getBackPath();
     $this->doc->docType = 'xhtml_trans';
     $this->doc->setModuleTemplate(PATH_TXCOMMERCE . 'Resources/Private/Backend/mod_index.html');
     $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 . ';
         }
     ');
 }