‪TYPO3CMS  9.5
FinisherContext.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It originated from the Neos.Form package (www.neos.io)
9  *
10  * It is free software; you can redistribute it and/or modify it under
11  * the terms of the GNU General Public License, either version 2
12  * of the License, or any later version.
13  *
14  * For the full copyright and license information, please read the
15  * LICENSE.txt file that was distributed with this source code.
16  *
17  * The TYPO3 project - inspiring people to share!
18  */
19 
24 
34 {
35 
41  protected ‪$cancelled = false;
42 
48  protected ‪$formRuntime;
49 
55  protected ‪$controllerContext;
56 
63 
70  {
71  $this->formRuntime = ‪$formRuntime;
72  $this->controllerContext = ‪$controllerContext;
73  }
74 
78  public function ‪initializeObject()
79  {
80  $this->finisherVariableProvider = GeneralUtility::makeInstance(ObjectManager::class)
81  ->get(FinisherVariableProvider::class);
82  }
83 
87  public function ‪cancel()
88  {
89  $this->cancelled = true;
90  }
91 
98  public function ‪isCancelled(): bool
99  {
100  return ‪$this->cancelled;
101  }
102 
108  public function ‪getFormRuntime(): FormRuntime
109  {
110  return ‪$this->formRuntime;
111  }
112 
118  public function ‪getFormValues(): array
119  {
120  return $this->formRuntime->getFormState()->getFormValues();
121  }
122 
127  {
129  }
130 
135  {
137  }
138 }
‪TYPO3\CMS\Form\Domain\Runtime\FormRuntime
Definition: FormRuntime.php:97
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\initializeObject
‪initializeObject()
Definition: FinisherContext.php:74
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$cancelled
‪bool $cancelled
Definition: FinisherContext.php:40
‪TYPO3\CMS\Form\Domain\Finishers\FinisherVariableProvider
Definition: FinisherVariableProvider.php:29
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\cancel
‪cancel()
Definition: FinisherContext.php:83
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\__construct
‪__construct(FormRuntime $formRuntime, ControllerContext $controllerContext)
Definition: FinisherContext.php:65
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$formRuntime
‪TYPO3 CMS Form Domain Runtime FormRuntime $formRuntime
Definition: FinisherContext.php:46
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext
Definition: ControllerContext.php:21
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$controllerContext
‪TYPO3 CMS Extbase Mvc Controller ControllerContext $controllerContext
Definition: FinisherContext.php:52
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\isCancelled
‪bool isCancelled()
Definition: FinisherContext.php:94
‪TYPO3\CMS\Form\Domain\Finishers
Definition: AbstractFinisher.php:3
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$finisherVariableProvider
‪FinisherVariableProvider $finisherVariableProvider
Definition: FinisherContext.php:58
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getFormValues
‪array getFormValues()
Definition: FinisherContext.php:114
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getFinisherVariableProvider
‪FinisherVariableProvider getFinisherVariableProvider()
Definition: FinisherContext.php:130
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext
Definition: FinisherContext.php:34
‪TYPO3\CMS\Form\Domain\Runtime\FormRuntime
Definition: FormSession.php:3
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Extbase\Object\ObjectManager
Definition: ObjectManager.php:25
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getFormRuntime
‪FormRuntime getFormRuntime()
Definition: FinisherContext.php:104
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getControllerContext
‪ControllerContext getControllerContext()
Definition: FinisherContext.php:122