‪TYPO3CMS  11.5
AbstractView.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 
19 
24 abstract class ‪AbstractView implements ‪ViewInterface
25 {
29  protected ‪$controllerContext;
30 
37  protected ‪$variables = [];
38 
45  {
46  $this->controllerContext = ‪$controllerContext;
47  }
48 
57  public function ‪assign($key, $value)
58  {
59  $this->variables[$key] = $value;
60  return $this;
61  }
62 
69  public function ‪assignMultiple(array $values)
70  {
71  foreach ($values as $key => $value) {
72  $this->‪assign($key, $value);
73  }
74  return $this;
75  }
76 
86  public function ‪canRender()
87  {
88  trigger_error('Method ' . __METHOD__ . ' has been deprecated in v11 and will be removed with v12.', E_USER_DEPRECATED);
89  return true;
90  }
91 
97  public function ‪initializeView() {}
98 }
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\canRender
‪bool canRender()
Definition: AbstractView.php:84
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\setControllerContext
‪setControllerContext(ControllerContext $controllerContext)
Definition: AbstractView.php:42
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext
Definition: ControllerContext.php:30
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\assignMultiple
‪TYPO3 CMS Extbase Mvc View AbstractView assignMultiple(array $values)
Definition: AbstractView.php:67
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\$controllerContext
‪TYPO3 CMS Extbase Mvc Controller ControllerContext $controllerContext
Definition: AbstractView.php:28
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\assign
‪TYPO3 CMS Extbase Mvc View AbstractView assign($key, $value)
Definition: AbstractView.php:55
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\$variables
‪array $variables
Definition: AbstractView.php:35
‪TYPO3\CMS\Extbase\Mvc\View\ViewInterface
Definition: ViewInterface.php:26
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView\initializeView
‪initializeView()
Definition: AbstractView.php:95
‪TYPO3\CMS\Extbase\Mvc\View
Definition: AbstractView.php:16
‪TYPO3\CMS\Extbase\Mvc\View\AbstractView
Definition: AbstractView.php:25