/** * Initializes the class. */ public function __construct() { Utility::checkAndPerformRequiredUpdates(); $this->databaseConnection = $GLOBALS['TYPO3_DB']; $this->tsfe = $GLOBALS['TSFE']; // Warning! It is important to init the new object and not reuse any existing object // $this->pageRepository->sys_language_uid must stay 0 because we will do overlays manually $this->pageRepository = GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Page\\PageRepository'); $this->pageRepository->init(FALSE); }
/** * Initializes all actions. * * @return void */ protected function initializeAction() { Utility::checkAndPerformRequiredUpdates(); $this->currentPageId = (int) \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('id'); $this->databaseConnection = $GLOBALS['TYPO3_DB']; // Fix pagers $arguments = GeneralUtility::_GPmerged('tx_realurl_web_realurlrealurl'); if ($arguments && is_array($arguments)) { foreach ($arguments as $argumentKey => $argumentValue) { if ($argumentValue) { if (!in_array($argumentKey, $this->excludedArgments)) { GeneralUtility::_GETset($argumentValue, 'tx_realurl_web_realurlrealurl|' . $argumentKey); } else { GeneralUtility::_GETset('', 'tx_realurl_web_realurlrealurl|' . $argumentKey); } } } } else { $this->forwardToLastModule(); } parent::initializeAction(); }