TYPO3 CMS  TYPO3_7-6
ControllerContext.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 
20 
25 {
32  public static function extend(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $source)
33  {
34  $controllerContext = \TYPO3\CMS\Form\Utility\FormUtility::getObjectManager()->get(self::class);
35  $propertyNames = ObjectAccess::getGettableProperties($source);
36  foreach ($propertyNames as $propertyName => $propertyValue) {
37  ObjectAccess::setProperty($controllerContext, $propertyName, $propertyValue);
38  }
39  return $controllerContext;
40  }
41 
45  protected $configuration;
46 
50  protected $validationElement;
51 
55  public function getConfiguration()
56  {
57  return $this->configuration;
58  }
59 
65  {
66  $this->configuration = $configuration;
67  return $this;
68  }
69 
73  public function getValidationElement()
74  {
76  }
77 
82  {
83  $this->validationElement = $validationElement;
84  }
85 }
setValidationElement(ValidationElement $validationElement)
static setProperty(&$subject, $propertyName, $propertyValue, $forceDirectAccess=false)
static extend(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext $source)