TYPO3  7.6
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 
88  public function setControllerContext(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
89  {
90  $this->templateView->setControllerContext($controllerContext);
91  }
92 
101  public function assign($key, $value)
102  {
103  $this->templateView->assign($key, $value);
104  return $this;
105  }
106 
115  public function assignMultiple(array $values)
116  {
117  $this->templateView->assignMultiple($values);
118  return $this;
119  }
120 
128  public function canRender(ControllerContext $controllerContext)
129  {
130  return $this->templateView->canRender($controllerContext);
131  }
132 
136  public function initializeView()
137  {
138  $this->templateView->initializeView();
139  }
140 }