‪TYPO3CMS  9.5
AbstractView.php
Go to the documentation of this file.
1 <?php
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 {
25  protected ‪$controllerContext;
26 
33  protected ‪$variables = [];
34 
40  public function ‪setControllerContext(\‪TYPO3\CMS\‪Extbase\Mvc\Controller\ControllerContext ‪$controllerContext)
41  {
42  $this->controllerContext = ‪$controllerContext;
43  }
44 
53  public function ‪assign($key, $value)
54  {
55  $this->variables[$key] = $value;
56  return $this;
57  }
58 
65  public function ‪assignMultiple(array $values)
66  {
67  foreach ($values as $key => $value) {
68  $this->‪assign($key, $value);
69  }
70  return $this;
71  }
72 
82  public function ‪canRender(\‪TYPO3\CMS\‪Extbase\Mvc\Controller\ControllerContext ‪$controllerContext)
83  {
84  return true;
85  }
86 
92  public function ‪initializeView()
93  {
94  }
95 }
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:4
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\canRender
‪bool canRender(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
Definition: AbstractView.php:80
‪TYPO3
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\assignMultiple
‪TYPO3 CMS Extbase Mvc View AbstractView assignMultiple(array $values)
Definition: AbstractView.php:63
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\$controllerContext
‪TYPO3 CMS Extbase Mvc Controller ControllerContext $controllerContext
Definition: AbstractView.php:24
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\assign
‪TYPO3 CMS Extbase Mvc View AbstractView assign($key, $value)
Definition: AbstractView.php:51
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\$variables
‪array $variables
Definition: AbstractView.php:31
‪TYPO3\CMS\Extbase\Mvc\View\ViewInterface
Definition: ViewInterface.php:21
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\initializeView
‪initializeView()
Definition: AbstractView.php:90
‪TYPO3\CMS\Extbase\Mvc\View
Definition: AbstractView.php:2
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView
Definition: AbstractView.php:21
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\setControllerContext
‪setControllerContext(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $controllerContext)
Definition: AbstractView.php:38