‪TYPO3CMS  ‪main
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 {
43  protected ‪$cancelled = false;
44 
49 
54 
55  private ‪Request ‪$request;
56 
61  {
62  $this->formRuntime = ‪$formRuntime;
63  $this->request = ‪$request;
64  $this->finisherVariableProvider = GeneralUtility::makeInstance(FinisherVariableProvider::class);
65  }
66 
70  public function ‪cancel()
71  {
72  $this->cancelled = true;
73  }
74 
80  public function ‪isCancelled(): bool
81  {
82  return ‪$this->cancelled;
83  }
84 
88  public function ‪getFormRuntime(): FormRuntime
89  {
90  return ‪$this->formRuntime;
91  }
92 
96  public function ‪getFormValues(): array
97  {
98  return $this->formRuntime->getFormState()->getFormValues();
99  }
100 
102  {
104  }
105 
106  public function ‪getRequest(): ‪Request
107  {
108  return ‪$this->request;
109  }
110 }
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getFormRuntime
‪getFormRuntime()
Definition: FinisherContext.php:87
‪TYPO3\CMS\Form\Domain\Runtime\FormRuntime
Definition: FormRuntime.php:106
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$cancelled
‪bool $cancelled
Definition: FinisherContext.php:42
‪TYPO3\CMS\Form\Domain\Finishers\FinisherVariableProvider
Definition: FinisherVariableProvider.php:31
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\cancel
‪cancel()
Definition: FinisherContext.php:69
‪TYPO3\CMS\Form\Domain\Finishers
Definition: AbstractFinisher.php:22
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$formRuntime
‪FormRuntime $formRuntime
Definition: FinisherContext.php:47
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\isCancelled
‪isCancelled()
Definition: FinisherContext.php:79
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$finisherVariableProvider
‪FinisherVariableProvider $finisherVariableProvider
Definition: FinisherContext.php:52
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\$request
‪Request $request
Definition: FinisherContext.php:54
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\__construct
‪__construct(FormRuntime $formRuntime, Request $request)
Definition: FinisherContext.php:59
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getFormValues
‪getFormValues()
Definition: FinisherContext.php:95
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getRequest
‪getRequest()
Definition: FinisherContext.php:105
‪TYPO3\CMS\Form\Domain\Finishers\FinisherContext\getFinisherVariableProvider
‪getFinisherVariableProvider()
Definition: FinisherContext.php:100
‪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:52
‪TYPO3\CMS\Extbase\Mvc\Request
Definition: Request.php:35