‪TYPO3CMS  9.5
FormConditionFunctionsProvider.php
Go to the documentation of this file.
1 <?php
2 declare(strict_types = 1);
3 
5 
6 /*
7  * This file is part of the TYPO3 CMS project.
8  *
9  * It is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU General Public License, either version 2
11  * of the License, or any later version.
12  *
13  * For the full copyright and license information, please read the
14  * LICENSE.txt file that was distributed with this source code.
15  *
16  * The TYPO3 project - inspiring people to share!
17  */
18 
19 use Symfony\Component\ExpressionLanguage\ExpressionFunction;
20 use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
21 
25 class ‪FormConditionFunctionsProvider implements ExpressionFunctionProviderInterface
26 {
27 
31  public function ‪getFunctions()
32  {
33  return [
35  ];
36  }
37 
43  protected function ‪getFormValueFunction(): ExpressionFunction
44  {
45  return new ExpressionFunction(
46  'getFormValue',
47  function () {
48  // Not implemented, we only use the evaluator
49  },
50  function ($arguments, $field) {
51  return $arguments['formValues'][$field] ?? null;
52  }
53  );
54  }
55 }
‪TYPO3\CMS\Form\Domain\Condition\Functions\FormConditionFunctionsProvider\getFunctions
‪ExpressionFunction[] getFunctions()
Definition: FormConditionFunctionsProvider.php:31
‪TYPO3\CMS\Form\Domain\Condition\Functions
Definition: FormConditionFunctionsProvider.php:4
‪TYPO3\CMS\Form\Domain\Condition\Functions\FormConditionFunctionsProvider\getFormValueFunction
‪Symfony Component ExpressionLanguage ExpressionFunction getFormValueFunction()
Definition: FormConditionFunctionsProvider.php:43
‪TYPO3\CMS\Form\Domain\Condition\Functions\FormConditionFunctionsProvider
Definition: FormConditionFunctionsProvider.php:26