/** * Initialize arguments. * * @return void * @api */ public function initializeArguments() { parent::initializeArguments(); $this->overrideArgument('table', 'string', 'The table to lookup records.', FALSE, self::defaultTable); $this->overrideArgument('field', 'string', 'The field of the table associated to resources.', FALSE, self::defaultField); $this->registerSlideArguments(); }
/** * @param integer $id * @return array */ public function getRecord($id) { $record = parent::getRecord($id); if (!$this->isDefaultLanguage()) { if (TYPO3_MODE === 'FE') { $pageRepository = $GLOBALS['TSFE']->sys_page; } else { $pageRepository = GeneralUtility::makeInstance(PageRepository::class); $pageRepository->init(false); } /** @var PageRepository $pageRepository */ $localisation = $pageRepository->getPageOverlay($record, $this->getCurrentLanguageUid()); if (is_array($localisation)) { $record = $localisation; } } return $record; }
/** * Initialize arguments. * * @return void * @api */ public function initializeArguments() { parent::initializeArguments(); $this->overrideArgument('table', 'string', 'The table to lookup records.', false, self::DEFAULT_TABLE); $this->overrideArgument('field', 'string', 'The field of the table associated to resources.', false, self::DEFAULT_FIELD); }