‪TYPO3CMS  ‪main
ValidationDto.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 
21 
23 {
27  protected ‪$prototypeName;
28 
32  protected ‪$formElementType;
33 
37  protected ‪$formElementIdentifier;
38 
42  protected ‪$propertyPath;
43 
48 
53 
54  public function ‪__construct(
55  ?string ‪$prototypeName = null,
56  ?string ‪$formElementType = null,
57  ?string ‪$formElementIdentifier = null,
58  ?string ‪$propertyPath = null,
59  ?string ‪$propertyCollectionName = null,
61  ) {
62  $this->prototypeName = ‪$prototypeName;
63  $this->formElementType = ‪$formElementType;
64  $this->formElementIdentifier = ‪$formElementIdentifier;
65  $this->propertyPath = ‪$propertyPath;
66  $this->propertyCollectionName = ‪$propertyCollectionName;
67  $this->propertyCollectionElementIdentifier = ‪$propertyCollectionElementIdentifier;
68  }
69 
70  public function ‪getPrototypeName(): string
71  {
73  }
74 
75  public function ‪getFormElementType(): string
76  {
78  }
79 
80  public function ‪getFormElementIdentifier(): string
81  {
83  }
84 
85  public function ‪getPropertyPath(): string
86  {
88  }
89 
90  public function ‪getPropertyCollectionName(): string
91  {
93  }
94 
95  public function ‪getPropertyCollectionElementIdentifier(): string
96  {
98  }
99 
100  public function ‪hasPrototypeName(): bool
101  {
102  return !empty($this->prototypeName);
103  }
104 
105  public function ‪hasFormElementType(): bool
106  {
107  return !empty($this->formElementType);
108  }
109 
110  public function ‪hasFormElementIdentifier(): bool
111  {
112  return !empty($this->formElementIdentifier);
113  }
114 
115  public function ‪hasPropertyPath(): bool
116  {
117  return !empty($this->propertyPath);
118  }
119 
120  public function ‪hasPropertyCollectionName(): bool
121  {
122  return !empty($this->propertyCollectionName);
123  }
124 
125  public function ‪hasPropertyCollectionElementIdentifier(): bool
126  {
127  return !empty($this->propertyCollectionElementIdentifier);
128  }
129 
131  {
132  return GeneralUtility::makeInstance(self::class, ‪$prototypeName, $this->formElementType, $this->formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
133  }
134 
136  {
137  return GeneralUtility::makeInstance(self::class, $this->prototypeName, ‪$formElementType, $this->formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
138  }
139 
141  {
142  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, ‪$formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
143  }
144 
145  public function ‪withPropertyPath(string ‪$propertyPath): ‪ValidationDto
146  {
147  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, $this->formElementIdentifier, ‪$propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
148  }
149 
151  {
152  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, $this->formElementIdentifier, $this->propertyPath, ‪$propertyCollectionName, $this->propertyCollectionElementIdentifier);
153  }
154 
156  {
157  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, $this->formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, ‪$propertyCollectionElementIdentifier);
158  }
159 }
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasPropertyCollectionElementIdentifier
‪hasPropertyCollectionElementIdentifier()
Definition: ValidationDto.php:119
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withPropertyPath
‪withPropertyPath(string $propertyPath)
Definition: ValidationDto.php:139
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPropertyCollectionName
‪getPropertyCollectionName()
Definition: ValidationDto.php:84
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasFormElementIdentifier
‪hasFormElementIdentifier()
Definition: ValidationDto.php:104
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\$formElementType
‪string $formElementType
Definition: ValidationDto.php:30
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getFormElementType
‪getFormElementType()
Definition: ValidationDto.php:69
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto
Definition: ValidationDto.php:23
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\$propertyCollectionName
‪string $propertyCollectionName
Definition: ValidationDto.php:42
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getFormElementIdentifier
‪getFormElementIdentifier()
Definition: ValidationDto.php:74
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasPropertyCollectionName
‪hasPropertyCollectionName()
Definition: ValidationDto.php:114
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withPrototypeName
‪withPrototypeName(string $prototypeName)
Definition: ValidationDto.php:124
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withFormElementIdentifier
‪withFormElementIdentifier(string $formElementIdentifier)
Definition: ValidationDto.php:134
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPropertyCollectionElementIdentifier
‪getPropertyCollectionElementIdentifier()
Definition: ValidationDto.php:89
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasFormElementType
‪hasFormElementType()
Definition: ValidationDto.php:99
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withPropertyCollectionName
‪withPropertyCollectionName(string $propertyCollectionName)
Definition: ValidationDto.php:144
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\__construct
‪__construct(?string $prototypeName=null, ?string $formElementType=null, ?string $formElementIdentifier=null, ?string $propertyPath=null, ?string $propertyCollectionName=null, ?string $propertyCollectionElementIdentifier=null)
Definition: ValidationDto.php:48
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withPropertyCollectionElementIdentifier
‪withPropertyCollectionElementIdentifier(string $propertyCollectionElementIdentifier)
Definition: ValidationDto.php:149
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators
Definition: AbstractValidator.php:18
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\$formElementIdentifier
‪string $formElementIdentifier
Definition: ValidationDto.php:34
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\$propertyCollectionElementIdentifier
‪string $propertyCollectionElementIdentifier
Definition: ValidationDto.php:46
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPropertyPath
‪getPropertyPath()
Definition: ValidationDto.php:79
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\$prototypeName
‪string $prototypeName
Definition: ValidationDto.php:26
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withFormElementType
‪withFormElementType(string $formElementType)
Definition: ValidationDto.php:129
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasPrototypeName
‪hasPrototypeName()
Definition: ValidationDto.php:94
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasPropertyPath
‪hasPropertyPath()
Definition: ValidationDto.php:109
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPrototypeName
‪getPrototypeName()
Definition: ValidationDto.php:64
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\$propertyPath
‪string $propertyPath
Definition: ValidationDto.php:38