/** * 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 Tx_Extbase_MVC_View_ViewInterface $view The view to be initialized * @return void * @api */ protected function initializeView(Tx_Extbase_MVC_View_ViewInterface $view) { // Evaluate write access on all tables $globalWriteAccess = $this->configurationRepository->findGlobalWriteAccess(); $view->assign('globalWriteAccess', $globalWriteAccess); $view->assign('view', strtolower($this->request->getControllerActionName())); // If TYPO3 version is lower then 4.7, use the old icon name for refresh // (this is necessary due to the way the Fluid BE View Helper for icon buttons was coded) if (t3lib_utility_VersionNumber::convertVersionNumberToInteger(TYPO3_branch) < '4007000') { $this->refreshIcon = 'refresh_n'; } $view->assign('refresh_icon', $this->refreshIcon); }
/** * 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 Tx_Extbase_MVC_View_ViewInterface $view The view to be initialized * @return void */ protected function initializeView(Tx_Extbase_MVC_View_ViewInterface $view) { $view->assign('contentObjectData', $this->configurationManager->getContentObject()->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 Tx_Extbase_MVC_View_ViewInterface $view The view to be initialized * @return void * @api */ protected function initializeView(Tx_Extbase_MVC_View_ViewInterface $view) { // Get the sample configurations provided by the various connector services $this->sampleConfigurations = $this->connectorRepository->findAllSampleConfigurations(); $view->assign('samples', $this->sampleConfigurations); }
/** * Allows to magically assign a variable to the View by just setting a * view's property. * * @param string $name The name of the variable. * @param string $value The value of the variable. * @return void * @author Romain Ruetschi <*****@*****.**> */ public function __set($name, $value) { return $this->view->assign($name, $value); }