‪TYPO3CMS  10.4
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 {
24 
28  protected ‪$prototypeName;
29 
33  protected ‪$formElementType;
34 
38  protected ‪$formElementIdentifier;
39 
43  protected ‪$propertyPath;
44 
49 
54 
63  public function ‪__construct(
64  string ‪$prototypeName = null,
65  string ‪$formElementType = null,
66  string ‪$formElementIdentifier = null,
67  string ‪$propertyPath = null,
68  string ‪$propertyCollectionName = null,
70  ) {
71  $this->prototypeName = ‪$prototypeName;
72  $this->formElementType = ‪$formElementType;
73  $this->formElementIdentifier = ‪$formElementIdentifier;
74  $this->propertyPath = ‪$propertyPath;
75  $this->propertyCollectionName = ‪$propertyCollectionName;
76  $this->propertyCollectionElementIdentifier = ‪$propertyCollectionElementIdentifier;
77  }
78 
82  public function ‪getPrototypeName(): string
83  {
85  }
86 
90  public function ‪getFormElementType(): string
91  {
93  }
94 
98  public function ‪getFormElementIdentifier(): string
99  {
101  }
102 
106  public function ‪getPropertyPath(): string
107  {
109  }
110 
114  public function ‪getPropertyCollectionName(): string
115  {
117  }
118 
122  public function ‪getPropertyCollectionElementIdentifier(): string
123  {
125  }
126 
130  public function ‪hasPrototypeName(): bool
131  {
132  return !empty($this->prototypeName);
133  }
134 
138  public function ‪hasFormElementType(): bool
139  {
140  return !empty($this->formElementType);
141  }
142 
146  public function ‪hasFormElementIdentifier(): bool
147  {
148  return !empty($this->formElementIdentifier);
149  }
150 
154  public function ‪hasPropertyPath(): bool
155  {
156  return !empty($this->propertyPath);
157  }
158 
162  public function ‪hasPropertyCollectionName(): bool
163  {
164  return !empty($this->propertyCollectionName);
165  }
166 
170  public function ‪hasPropertyCollectionElementIdentifier(): bool
171  {
172  return !empty($this->propertyCollectionElementIdentifier);
173  }
174 
180  {
181  return GeneralUtility::makeInstance(self::class, ‪$prototypeName, $this->formElementType, $this->formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
182  }
183 
189  {
190  return GeneralUtility::makeInstance(self::class, $this->prototypeName, ‪$formElementType, $this->formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
191  }
192 
198  {
199  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, ‪$formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
200  }
201 
206  public function ‪withPropertyPath(string ‪$propertyPath): ‪ValidationDto
207  {
208  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, $this->formElementIdentifier, ‪$propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
209  }
210 
216  {
217  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, $this->formElementIdentifier, $this->propertyPath, ‪$propertyCollectionName, $this->propertyCollectionElementIdentifier);
218  }
219 
225  {
226  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, $this->formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, ‪$propertyCollectionElementIdentifier);
227  }
228 }
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPrototypeName
‪string getPrototypeName()
Definition: ValidationDto.php:76
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasPropertyPath
‪bool hasPropertyPath()
Definition: ValidationDto.php:148
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withPropertyCollectionElementIdentifier
‪ValidationDto withPropertyCollectionElementIdentifier(string $propertyCollectionElementIdentifier)
Definition: ValidationDto.php:218
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasPrototypeName
‪bool hasPrototypeName()
Definition: ValidationDto.php:124
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasPropertyCollectionElementIdentifier
‪bool hasPropertyCollectionElementIdentifier()
Definition: ValidationDto.php:164
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withFormElementType
‪ValidationDto withFormElementType(string $formElementType)
Definition: ValidationDto.php:182
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\$formElementType
‪string $formElementType
Definition: ValidationDto.php:31
‪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:43
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withFormElementIdentifier
‪ValidationDto withFormElementIdentifier(string $formElementIdentifier)
Definition: ValidationDto.php:191
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withPrototypeName
‪ValidationDto withPrototypeName(string $prototypeName)
Definition: ValidationDto.php:173
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasPropertyCollectionName
‪bool hasPropertyCollectionName()
Definition: ValidationDto.php:156
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPropertyPath
‪string getPropertyPath()
Definition: ValidationDto.php:100
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasFormElementType
‪bool hasFormElementType()
Definition: ValidationDto.php:132
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getFormElementIdentifier
‪string getFormElementIdentifier()
Definition: ValidationDto.php:92
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPropertyCollectionElementIdentifier
‪string getPropertyCollectionElementIdentifier()
Definition: ValidationDto.php:116
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getFormElementType
‪string getFormElementType()
Definition: ValidationDto.php:84
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators
Definition: AbstractValidator.php:18
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withPropertyCollectionName
‪ValidationDto withPropertyCollectionName(string $propertyCollectionName)
Definition: ValidationDto.php:209
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\$formElementIdentifier
‪string $formElementIdentifier
Definition: ValidationDto.php:35
‪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:57
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\$propertyCollectionElementIdentifier
‪string $propertyCollectionElementIdentifier
Definition: ValidationDto.php:47
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\$prototypeName
‪string $prototypeName
Definition: ValidationDto.php:27
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\hasFormElementIdentifier
‪bool hasFormElementIdentifier()
Definition: ValidationDto.php:140
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\withPropertyPath
‪ValidationDto withPropertyPath(string $propertyPath)
Definition: ValidationDto.php:200
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPropertyCollectionName
‪string getPropertyCollectionName()
Definition: ValidationDto.php:108
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\$propertyPath
‪string $propertyPath
Definition: ValidationDto.php:39