‪TYPO3CMS  10.4
FormConditionFunctionsProvider.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 
19 
20 use Symfony\Component\ExpressionLanguage\ExpressionFunction;
21 use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
22 
26 class ‪FormConditionFunctionsProvider implements ExpressionFunctionProviderInterface
27 {
28 
32  public function ‪getFunctions()
33  {
34  return [
36  ];
37  }
38 
44  protected function ‪getFormValueFunction(): ExpressionFunction
45  {
46  return new ExpressionFunction(
47  'getFormValue',
48  function () {
49  // Not implemented, we only use the evaluator
50  },
51  function ($arguments, $field) {
52  return $arguments['formValues'][$field] ?? null;
53  }
54  );
55  }
56 }
‪TYPO3\CMS\Form\Domain\Condition\Functions\FormConditionFunctionsProvider\getFunctions
‪ExpressionFunction[] getFunctions()
Definition: FormConditionFunctionsProvider.php:32
‪TYPO3\CMS\Form\Domain\Condition\Functions
Definition: FormConditionFunctionsProvider.php:18
‪TYPO3\CMS\Form\Domain\Condition\Functions\FormConditionFunctionsProvider\getFormValueFunction
‪Symfony Component ExpressionLanguage ExpressionFunction getFormValueFunction()
Definition: FormConditionFunctionsProvider.php:44
‪TYPO3\CMS\Form\Domain\Condition\Functions\FormConditionFunctionsProvider
Definition: FormConditionFunctionsProvider.php:27