コード例 #1
0
 /**
  * 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);
 }
コード例 #2
0
 /**
  * Calls the specified action method and passes the arguments.
  *
  * If the action returns a string, it is appended to the content in the
  * response object. If the action doesn't return anything and a valid
  * view exists, the view is rendered automatically.
  *
  * @param string $actionMethodName Name of the action method to call
  * @return void
  * @api
  */
 protected function callActionMethod()
 {
     $argumentsAreValid = TRUE;
     $preparedArguments = array();
     foreach ($this->arguments as $argument) {
         $preparedArguments[] = $argument->getValue();
     }
     if ($this->argumentsMappingResults->hasErrors()) {
         $actionResult = call_user_func(array($this, $this->errorMethodName));
     } else {
         $actionResult = call_user_func_array(array($this, $this->actionMethodName), $preparedArguments);
     }
     if ($actionResult === NULL && $this->view instanceof Tx_Extbase_MVC_View_ViewInterface) {
         $this->response->appendContent($this->view->render());
     } elseif (is_string($actionResult) && strlen($actionResult) > 0) {
         $this->response->appendContent($actionResult);
     }
 }
コード例 #3
0
 /**
  * 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);
 }
コード例 #4
0
 /**
  * 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);
 }
コード例 #5
0
ファイル: ViewAdapter.php プロジェクト: romac/Powered
 /**
  * Renders the view
  *
  * @return string The rendered view
  */
 public function render()
 {
     return $this->view->render();
 }