TYPO3 CMS  TYPO3_8-7
BackendTemplateView.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\Backend\View;
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
21 
29 {
33  protected $moduleTemplate;
34 
38  protected $templateView;
39 
44  {
45  $this->moduleTemplate = $moduleTemplate;
46  }
47 
52  {
53  $this->templateView = $templateView;
54  }
55 
59  public function getModuleTemplate()
60  {
61  return $this->moduleTemplate;
62  }
63 
74  public function render($actionName = null)
75  {
76  $actionViewContent = $this->templateView->render($actionName);
77  $this->moduleTemplate->setContent($actionViewContent);
78  return $this->moduleTemplate->renderContent();
79  }
80 
87  public function setControllerContext(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
88  {
89  $this->templateView->setControllerContext($controllerContext);
90  }
91 
100  public function assign($key, $value)
101  {
102  $this->templateView->assign($key, $value);
103  return $this;
104  }
105 
114  public function assignMultiple(array $values)
115  {
116  $this->templateView->assignMultiple($values);
117  return $this;
118  }
119 
127  public function canRender(ControllerContext $controllerContext)
128  {
129  return $this->templateView->canRender($controllerContext);
130  }
131 
135  public function initializeView()
136  {
137  $this->templateView->initializeView();
138  }
139 
146  public function setTemplateRootPaths(array $templateRootPaths)
147  {
148  $this->templateView->setTemplateRootPaths($templateRootPaths);
149  }
150 
157  public function setPartialRootPaths(array $partialRootPaths)
158  {
159  $this->templateView->setPartialRootPaths($partialRootPaths);
160  }
161 
168  public function setLayoutRootPaths(array $layoutRootPaths)
169  {
170  $this->templateView->setLayoutRootPaths($layoutRootPaths);
171  }
172 }
injectTemplateView(TemplateView $templateView)
canRender(ControllerContext $controllerContext)
setControllerContext(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
injectModuleTemplate(ModuleTemplate $moduleTemplate)