‪TYPO3CMS  ‪main
AbstractTemplateView.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
20 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
21 use TYPO3Fluid\Fluid\View\AbstractTemplateView as Typo3FluidAbstractTemplateView;
22 use TYPO3Fluid\Fluid\View\Exception\InvalidTemplateResourceException;
23 
29 abstract class ‪AbstractTemplateView extends Typo3FluidAbstractTemplateView
30 {
34  public function ‪__construct(?RenderingContextInterface $context = null)
35  {
36  if (!$context) {
37  $context = GeneralUtility::makeInstance(RenderingContextFactory::class)->create();
38  }
39  parent::__construct($context);
40  }
41 
45  public function ‪setTemplate(string $templateName): void
46  {
47  $this->baseRenderingContext->setControllerAction($templateName);
48  }
49 
56  public function ‪setTemplatePathAndFilename($templatePathAndFilename)
57  {
58  $this->baseRenderingContext->getTemplatePaths()->setTemplatePathAndFilename($templatePathAndFilename);
59  }
60 
67  public function ‪setTemplateRootPaths(array $templateRootPaths)
68  {
69  $this->baseRenderingContext->getTemplatePaths()->setTemplateRootPaths($templateRootPaths);
70  }
71 
77  public function ‪getTemplateRootPaths()
78  {
79  return $this->baseRenderingContext->getTemplatePaths()->getTemplateRootPaths();
80  }
81 
88  public function ‪setPartialRootPaths(array $partialRootPaths)
89  {
90  $this->baseRenderingContext->getTemplatePaths()->setPartialRootPaths($partialRootPaths);
91  }
92 
99  public function ‪getPartialRootPaths()
100  {
101  return $this->baseRenderingContext->getTemplatePaths()->getPartialRootPaths();
102  }
103 
110  public function ‪getLayoutRootPaths()
111  {
112  return $this->baseRenderingContext->getTemplatePaths()->getLayoutRootPaths();
113  }
114 
121  public function ‪setLayoutRootPaths(array $layoutRootPaths)
122  {
123  $this->baseRenderingContext->getTemplatePaths()->setLayoutRootPaths($layoutRootPaths);
124  }
125 }
‪TYPO3\CMS\Fluid\View\AbstractTemplateView\getLayoutRootPaths
‪string[] getLayoutRootPaths()
Definition: AbstractTemplateView.php:110
‪TYPO3\CMS\Fluid\View\AbstractTemplateView
Definition: AbstractTemplateView.php:30
‪TYPO3\CMS\Fluid\View\AbstractTemplateView\getTemplateRootPaths
‪string[] getTemplateRootPaths()
Definition: AbstractTemplateView.php:77
‪TYPO3\CMS\Fluid\View\AbstractTemplateView\getPartialRootPaths
‪string[] getPartialRootPaths()
Definition: AbstractTemplateView.php:99
‪TYPO3\CMS\Fluid\View\AbstractTemplateView\setTemplate
‪setTemplate(string $templateName)
Definition: AbstractTemplateView.php:45
‪TYPO3\CMS\Fluid\View\AbstractTemplateView\setTemplatePathAndFilename
‪setTemplatePathAndFilename($templatePathAndFilename)
Definition: AbstractTemplateView.php:56
‪TYPO3\CMS\Fluid\Core\Rendering\RenderingContextFactory
Definition: RenderingContextFactory.php:51
‪TYPO3\CMS\Fluid\View\AbstractTemplateView\setLayoutRootPaths
‪setLayoutRootPaths(array $layoutRootPaths)
Definition: AbstractTemplateView.php:121
‪TYPO3\CMS\Fluid\View\AbstractTemplateView\setPartialRootPaths
‪setPartialRootPaths(array $partialRootPaths)
Definition: AbstractTemplateView.php:88
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Fluid\View\AbstractTemplateView\__construct
‪__construct(?RenderingContextInterface $context=null)
Definition: AbstractTemplateView.php:34
‪TYPO3\CMS\Fluid\View
Definition: AbstractTemplateView.php:16
‪TYPO3\CMS\Fluid\View\AbstractTemplateView\setTemplateRootPaths
‪setTemplateRootPaths(array $templateRootPaths)
Definition: AbstractTemplateView.php:67