‪TYPO3CMS  ‪main
AbstractValidator.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 
23 
28 {
32  protected ‪$currentElement;
33 
37  protected ‪$sessionToken;
38 
42  protected ‪$validationDto;
43 
45  {
46  $this->currentElement = ‪$currentElement;
47  $this->sessionToken = ‪$sessionToken;
48  $this->validationDto = ‪$validationDto;
49  }
50 
54  protected function ‪buildHmacDataPath(string $propertyPath): string
55  {
56  $pathParts = explode('.', $propertyPath);
57  $lastPathSegment = array_pop($pathParts);
58  $pathParts[] = '_orig_' . $lastPathSegment;
59 
60  return implode('.', $pathParts);
61  }
62 
64  {
65  return GeneralUtility::makeInstance(FormDefinitionValidationService::class);
66  }
67 
69  {
70  return GeneralUtility::makeInstance(ConfigurationService::class);
71  }
72 }
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidatorInterface
Definition: ValidatorInterface.php:24
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\AbstractValidator\$sessionToken
‪string $sessionToken
Definition: AbstractValidator.php:35
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\AbstractValidator\$currentElement
‪array $currentElement
Definition: AbstractValidator.php:31
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto
Definition: ValidationDto.php:23
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\AbstractValidator\getFormDefinitionValidationService
‪getFormDefinitionValidationService()
Definition: AbstractValidator.php:60
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinitionValidationService
Definition: FormDefinitionValidationService.php:35
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\AbstractValidator\__construct
‪__construct(array $currentElement, string $sessionToken, ValidationDto $validationDto)
Definition: AbstractValidator.php:41
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\AbstractValidator\$validationDto
‪ValidationDto $validationDto
Definition: AbstractValidator.php:39
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators
Definition: AbstractValidator.php:18
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService
Definition: ConfigurationService.php:50
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\AbstractValidator\buildHmacDataPath
‪buildHmacDataPath(string $propertyPath)
Definition: AbstractValidator.php:51
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\AbstractValidator
Definition: AbstractValidator.php:28
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\AbstractValidator\getConfigurationService
‪getConfigurationService()
Definition: AbstractValidator.php:65