Inheritance: extends AbstractRecordResourceViewHelper
コード例 #1
0
ファイル: FalViewHelper.php プロジェクト: smichaelsen/vhs
 /**
  * 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();
 }
コード例 #2
0
ファイル: FalViewHelper.php プロジェクト: fluidtypo3/vhs
 /**
  * @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;
 }
コード例 #3
0
ファイル: FalViewHelper.php プロジェクト: fluidtypo3/vhs
 /**
  * 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);
 }