‪TYPO3CMS  10.4
FinisherContext.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
18 /*
19  * Inspired by and partially taken from the Neos.Form package (www.neos.io)
20  */
21 
23 
27 
37 {
38 
44  protected ‪$cancelled = false;
45 
51  protected ‪$formRuntime;
52 
58  protected ‪$controllerContext;
59 
66 
73  {
74  $this->formRuntime = ‪$formRuntime;
75  $this->controllerContext = ‪$controllerContext;
76  }
77 
81  public function ‪initializeObject()
82  {
83  $this->finisherVariableProvider = GeneralUtility::makeInstance(FinisherVariableProvider::class);
84  }
85 
89  public function ‪cancel()
90  {
91  $this->cancelled = true;
92  }
93 
100  public function ‪isCancelled(): bool
101  {
102  return ‪$this->cancelled;
103  }
104 
110  public function ‪getFormRuntime(): FormRuntime
111  {
112  return ‪$this->formRuntime;
113  }
114 
120  public function ‪getFormValues(): array
121  {
122  return $this->formRuntime->getFormState()->getFormValues();
123  }
124 
129  {
131  }
132 
137  {
139  }
140 }
‪TYPO3\CMS\Form\Domain\Runtime\FormRuntime
Definition: FormRuntime.php:103
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\initializeObject
‪initializeObject()
Definition: FinisherContext.php:77
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$cancelled
‪bool $cancelled
Definition: FinisherContext.php:43
‪TYPO3\CMS\Form\Domain\Finishers\FinisherVariableProvider
Definition: FinisherVariableProvider.php:31
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\cancel
‪cancel()
Definition: FinisherContext.php:85
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\__construct
‪__construct(FormRuntime $formRuntime, ControllerContext $controllerContext)
Definition: FinisherContext.php:68
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$formRuntime
‪TYPO3 CMS Form Domain Runtime FormRuntime $formRuntime
Definition: FinisherContext.php:49
‪TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext
Definition: ControllerContext.php:28
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$controllerContext
‪TYPO3 CMS Extbase Mvc Controller ControllerContext $controllerContext
Definition: FinisherContext.php:55
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\isCancelled
‪bool isCancelled()
Definition: FinisherContext.php:96
‪TYPO3\CMS\Form\Domain\Finishers
Definition: AbstractFinisher.php:22
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$finisherVariableProvider
‪FinisherVariableProvider $finisherVariableProvider
Definition: FinisherContext.php:61
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getFormValues
‪array getFormValues()
Definition: FinisherContext.php:116
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getFinisherVariableProvider
‪FinisherVariableProvider getFinisherVariableProvider()
Definition: FinisherContext.php:132
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext
Definition: FinisherContext.php:37
‪TYPO3\CMS\Form\Domain\Runtime\FormRuntime
Definition: FormSession.php:18
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getFormRuntime
‪FormRuntime getFormRuntime()
Definition: FinisherContext.php:106
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getControllerContext
‪ControllerContext getControllerContext()
Definition: FinisherContext.php:124