/** * Initializes the view before invoking an action method. * * Override this method to solve assign variables common for all actions * or prepare the view in another way before the action is called. * * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view The view to be initialized * @return void * @api */ protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) { $this->contentObject = $this->configurationManager->getContentObject(); $this->contentObjectData = $this->contentObject->data; $this->data['parent'] = $this->contentObjectData; $view->assign('data', $this->data); if ($this->settings['region']['htmlTag_langKey']) { $this->region = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('_', $this->settings['region']['htmlTag_langKey']); $this->region = $this->region[1]; } else { $this->region = $this->settings['region']['default']; } $view->assign('region', $this->region); parent::initializeView($view); if (count($this->settings['javascript']['load']) > 0) { foreach ($this->settings['javascript']['load'] as $key => $value) { if ($value['enable']) { $src = $value['src']; if ($key == 'googleMapsApi') { $src .= '&language=' . ($this->settings['region']['htmlTag_langKey'] ? $this->settings['region']['htmlTag_langKey'] : $this->settings['region']['default']); } if ($key == 'googleMapsApi' && '' != $this->settings['general']['google']['apikey']) { $src .= '&key=' . $this->settings['general']['google']['apikey']; } $this->response->addAdditionalHeaderData($this->wrapJavascriptFile($src)); } } } }
/** * Initializes the view before invoking an action method. * Override this method to solve assign variables common for all actions * or prepare the view in another way before the action is called. * * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view The view to be initialized * @return void */ protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) { $cObjData = $this->configurationManager->getContentObject()->data; $view->assign('newsItem', $cObjData); //$view->assign('contentObjectData', $this->configurationManager->getContentObject()->data); $view->assign('emConfiguration', EmConfiguration::getSettings()); parent::initializeView($view); }
/** * Renders the content preview of a content element. * * The initial item content is passed as a reference like in the core's * PageLayoutViewDrawItemHookInterface. The implementation has to modify * the content. * * @param PageLayoutView $parentObject Calling parent object * @param string $itemContent Item content * @param array $row Record row of tt_content * * @return void */ public function renderContent(PageLayoutView &$parentObject, &$itemContent, array &$row) { $this->view->assign('section', 'itemContent'); $this->view->assign('uid', $row['uid']); $this->view->assign('code', $row['bodytext']); $this->view->assign('label', $row['subheader']); $itemContent .= $this->view->render(); }
/** * Renders the content preview of a content element. * * The initial item content is passed as a reference like in the core's * PageLayoutViewDrawItemHookInterface. The implementation has to modify * the content. * * @param PageLayoutView $parentObject Calling parent object * @param string $itemContent Item content * @param array $row Record row of tt_content * * @return void */ public function renderContent(PageLayoutView &$parentObject, &$itemContent, array &$row) { $this->view->assign('section', 'itemContent'); $pageType = Type::fromString($this->getFlexformValue($row['pi_flexform'], 'settings.pageType')); $offset = (int) $this->getFlexformValue($row['pi_flexform'], 'settings.offset'); $limit = (int) $this->getFlexformValue($row['pi_flexform'], 'settings.limit'); $this->view->assign('typeLabelReference', $this->getPageTypeLabelReference($pageType)); $this->view->assign('offset', $offset); $this->view->assign('limit', $limit); $pages = $this->pageRepository->findLastUpdated($pageType, $offset - 1, $limit); $this->view->assign('pages', $pages); $itemContent .= $this->view->render(); }
/** * Initializes the view before invoking an action method. * * Assigns the current module to the view * * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view The view to be initialized * @return void */ protected function initializeView(ViewInterface $view) { $view->assign('module', $this); }
/** * Initializes view * * @param ViewInterface $view The view to be initialized * @return void */ protected function initializeView(ViewInterface $view) { $view->assign('previewUrl', BackendUtility::viewonclick($this->pageInfo['uid'], $GLOBALS['BACK_PATH'], BackendUtility::BEgetRootLine($this->pageInfo['uid']))); }
/** * Initializes the view before invoking an action method. * Add content object data to view * * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view The view to be initialized * @return void */ protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) { $view->assign('contentObjectData', $this->configurationManager->getContentObject()->data); parent::initializeView($view); }
/** * Initializes the view before invoking an action method. * Override this method to solve assign variables common for all actions * or prepare the view in another way before the action is called. * * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view The view to be initialized * @return void */ protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) { $view->assign('contentObjectData', $this->configurationManager->getContentObject()->data); $view->assign('emConfiguration', EmConfiguration::getSettings()); $view->assign('isVersion7Compatible', GeneralUtility::compat_version('7.0')); }
/** * Initializes the title for the RSS feed of the current action consisting * of the page title and the content element header. * * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view */ protected function initializeRssTitle(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) { if (!empty($this->settings['list']['rss']['channel']['title'])) { $view->assign('rssTitle', $this->settings['list']['rss']['channel']['title']); return; } $rssTitle = $this->configurationManager->getContentObject()->data['header']; \TYPO3\CMS\Frontend\Page\PageGenerator::generatePageTitle(); $rssTitle .= ' - ' . $this->getTypoScriptFrontendController()->getPageRenderer()->getTitle(); $view->assign('rssTitle', $rssTitle); }
/** * [initializeView description] * * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view [description] * @return void */ protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) { $view->assign('layout', $this->isAjax ? 'Ajax' : 'Default'); $view->assign('setup', $this->setup); $view->assign('data', $this->data); }
/** * Initializes the view before invoking an action method. * Override this method to solve assign variables common for all actions * or prepare the view in another way before the action is called. * * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view The view to be initialized * @return void */ protected function initializeView(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view) { $view->assign('contentObjectData', $this->configurationManager->getContentObject()->data); $view->assign('emConfiguration', Tx_MooxNews_Utility_EmConfiguration::getSettings()); }
/** * @param ViewInterface $view */ public function initializeView(ViewInterface $view) { $view->assign('backendUserData', $this->backendUser->user); $view->assign('configuration', $this->configuration); }