示例#1
0
 /**
  * Initialize the handle action, sets up fluid stuff and assigns default variables.
  *
  * @return void
  */
 protected function initializeHandle()
 {
     // Context service distinguishes between standalone and backend context
     $contextService = $this->objectManager->get(\TYPO3\CMS\Install\Service\ContextService::class);
     $viewRootPath = GeneralUtility::getFileAbsFileName('EXT:install/Resources/Private/');
     $controllerActionDirectoryName = ucfirst($this->controller);
     $mainTemplate = ucfirst($this->action);
     $this->view->setTemplatePathAndFilename($viewRootPath . 'Templates/Action/' . $controllerActionDirectoryName . '/' . $mainTemplate . '.html');
     $this->view->setLayoutRootPaths(array($viewRootPath . 'Layouts/'));
     $this->view->setPartialRootPaths(array($viewRootPath . 'Partials/'));
     $this->view->assign('time', time())->assign('action', $this->action)->assign('controller', $this->controller)->assign('token', $this->token)->assign('context', $contextService->getContextString())->assign('contextService', $contextService)->assign('lastError', $this->lastError)->assign('messages', $this->messages)->assign('typo3Version', TYPO3_version)->assign('siteName', $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']);
 }
 /**
  * Renders a specific section of the template
  *
  * This allows fine-grained modularization of the different
  * message parts (subject, plain/html body)
  *
  * @param string $section Name of the section to render
  *
  * @return string
  */
 private function renderSection($section)
 {
     $this->view->assign('Section', $section);
     return trim($this->view->render());
 }