‪TYPO3CMS  10.4
AbstractBackendViewHelper.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 
21 use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
22 
27 abstract class ‪AbstractBackendViewHelper extends AbstractViewHelper
28 {
35  public function ‪getModuleTemplate()
36  {
37  $viewHelperVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
38  if ($viewHelperVariableContainer->exists(self::class, 'ModuleTemplate')) {
39  $moduleTemplate = $viewHelperVariableContainer->get(self::class, 'ModuleTemplate');
40  } else {
41  $moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
42  $viewHelperVariableContainer->add(self::class, 'ModuleTemplate', $moduleTemplate);
43  }
44  return $moduleTemplate;
45  }
46 
53  public function ‪getPageRenderer()
54  {
55  $viewHelperVariableContainer = $this->renderingContext->getViewHelperVariableContainer();
56  if ($viewHelperVariableContainer->exists(self::class, 'PageRenderer')) {
57  $pageRenderer = $viewHelperVariableContainer->get(self::class, 'PageRenderer');
58  } else {
59  $pageRenderer = GeneralUtility::makeInstance(PageRenderer::class);
60  $viewHelperVariableContainer->add(self::class, 'PageRenderer', $pageRenderer);
61  }
62 
63  return $pageRenderer;
64  }
65 }
‪TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper\getPageRenderer
‪PageRenderer getPageRenderer()
Definition: AbstractBackendViewHelper.php:53
‪TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper
Definition: AbstractBackendViewHelper.php:28
‪TYPO3\CMS\Fluid\ViewHelpers\Be
Definition: AbstractBackendViewHelper.php:16
‪TYPO3\CMS\Backend\Template\ModuleTemplate
Definition: ModuleTemplate.php:43
‪TYPO3\CMS\Core\Page\PageRenderer
Definition: PageRenderer.php:42
‪TYPO3\CMS\Fluid\ViewHelpers\Be\AbstractBackendViewHelper\getModuleTemplate
‪ModuleTemplate getModuleTemplate()
Definition: AbstractBackendViewHelper.php:35
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46