TYPO3 CMS  TYPO3_8-7
ValidationDto.php
Go to the documentation of this file.
1 <?php
2 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 
24 {
25 
29  protected $prototypeName;
30 
34  protected $formElementType;
35 
40 
44  protected $propertyPath;
45 
50 
55 
64  public function __construct(
65  string $prototypeName = null,
66  string $formElementType = null,
67  string $formElementIdentifier = null,
68  string $propertyPath = null,
69  string $propertyCollectionName = null,
71  ) {
72  $this->prototypeName = $prototypeName;
73  $this->formElementType = $formElementType;
74  $this->formElementIdentifier = $formElementIdentifier;
75  $this->propertyPath = $propertyPath;
76  $this->propertyCollectionName = $propertyCollectionName;
77  $this->propertyCollectionElementIdentifier = $propertyCollectionElementIdentifier;
78  }
79 
83  public function getPrototypeName(): string
84  {
85  return $this->prototypeName;
86  }
87 
91  public function getFormElementType(): string
92  {
94  }
95 
99  public function getFormElementIdentifier(): string
100  {
102  }
103 
107  public function getPropertyPath(): string
108  {
109  return $this->propertyPath;
110  }
111 
115  public function getPropertyCollectionName(): string
116  {
118  }
119 
123  public function getPropertyCollectionElementIdentifier(): string
124  {
126  }
127 
131  public function hasPrototypeName(): bool
132  {
133  return !empty($this->prototypeName);
134  }
135 
139  public function hasFormElementType(): bool
140  {
141  return !empty($this->formElementType);
142  }
143 
147  public function hasFormElementIdentifier(): bool
148  {
149  return !empty($this->formElementIdentifier);
150  }
151 
155  public function hasPropertyPath(): bool
156  {
157  return !empty($this->propertyPath);
158  }
159 
163  public function hasPropertyCollectionName(): bool
164  {
165  return !empty($this->propertyCollectionName);
166  }
167 
172  {
173  return !empty($this->propertyCollectionElementIdentifier);
174  }
175 
181  {
182  return GeneralUtility::makeInstance(self::class, $prototypeName, $this->formElementType, $this->formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
183  }
184 
190  {
191  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $formElementType, $this->formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
192  }
193 
199  {
200  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, $formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
201  }
202 
208  {
209  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, $this->formElementIdentifier, $propertyPath, $this->propertyCollectionName, $this->propertyCollectionElementIdentifier);
210  }
211 
217  {
218  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, $this->formElementIdentifier, $this->propertyPath, $propertyCollectionName, $this->propertyCollectionElementIdentifier);
219  }
220 
226  {
227  return GeneralUtility::makeInstance(self::class, $this->prototypeName, $this->formElementType, $this->formElementIdentifier, $this->propertyPath, $this->propertyCollectionName, $propertyCollectionElementIdentifier);
228  }
229 }
withPropertyCollectionElementIdentifier(string $propertyCollectionElementIdentifier)
__construct(string $prototypeName=null, string $formElementType=null, string $formElementIdentifier=null, string $propertyPath=null, string $propertyCollectionName=null, string $propertyCollectionElementIdentifier=null)
static makeInstance($className,... $constructorArguments)