‪TYPO3CMS  10.4
ConfigurationService.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 
45 
51 {
52 
56  protected ‪$formSettings;
57 
61  protected ‪$firstLevelCache = [];
62 
66  protected ‪$translationService;
67 
71  public function ‪initializeObject(): void
72  {
73  $this->formSettings = GeneralUtility::makeInstance(ObjectManager::class)
74  ->get(ConfigurationManagerInterface::class)
76  }
77 
85  public function ‪getPrototypeConfiguration(string $prototypeName): array
86  {
87  if (!isset($this->formSettings['prototypes'][$prototypeName])) {
89  sprintf('The Prototype "%s" was not found.', $prototypeName),
90  1475924277
91  );
92  }
93  return $this->formSettings['prototypes'][$prototypeName];
94  }
95 
103  {
104  $returnValue = GeneralUtility::makeInstance(
105  ArrayProcessor::class,
106  $this->formSettings['formManager']['selectablePrototypesConfiguration'] ?? []
107  )->forEach(
108  GeneralUtility::makeInstance(
109  ArrayProcessing::class,
110  'selectablePrototypeNames',
111  '^([\d]+)\.identifier$',
112  function ($_, $value) {
113  return $value;
114  }
115  )
116  );
117 
118  return array_values($returnValue['selectablePrototypeNames'] ?? []);
119  }
120 
149  {
150  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
151  $dto->‪getPrototypeName()
152  );
153 
154  $subConfig = $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()] ?? [];
155  return $this->‪isPropertyDefinedInFormEditorSetup($dto->‪getPropertyPath(), $subConfig);
156  }
157 
184  {
185  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
186  $dto->‪getPrototypeName()
187  );
188  $subConfig = $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()] ?? [];
189 
190  return $this->‪isPropertyDefinedInFormEditorSetup($dto->‪getPropertyPath(), $subConfig);
191  }
192 
204  ‪ValidationDto $dto
205  ): bool {
206  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
207  $dto->‪getPrototypeName()
208  );
209 
210  $propertyPath = $this->‪getBasePropertyPathFromMultiValueFormElementProperty($dto);
211  return isset(
212  $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['selectOptions'][$propertyPath]
213  );
214  }
215 
226  ‪ValidationDto $dto,
227  bool $translated = true
228  ): array {
230  throw new ‪PropertyException(
231  sprintf(
232  'No selectOptions found for form element type "%s" and property path "%s"',
233  $dto->‪getFormElementType(),
234  $dto->‪getPropertyPath()
235  ),
236  1614264312
237  );
238  }
239 
240  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
241  $dto->‪getPrototypeName()
242  );
243 
244  $property = $translated ? 'selectOptions' : 'untranslatedSelectOptions';
245  $propertyPath = $this->‪getBasePropertyPathFromMultiValueFormElementProperty($dto);
246  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()][$property][$propertyPath];
247  }
248 
260  ‪ValidationDto $dto
261  ): bool {
262  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
263  $dto->‪getPrototypeName()
264  );
265 
267  return isset(
268  $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['selectOptions'][$propertyPath]
269  );
270  }
271 
282  ‪ValidationDto $dto,
283  bool $translated = true
284  ): array {
286  throw new ‪PropertyException(
287  sprintf(
288  'No selectOptions found for property collection "%s" and identifier "%s" and property path "%s"',
291  $dto->‪getPropertyPath()
292  ),
293  1614264313
294  );
295  }
296 
297  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
298  $dto->‪getPrototypeName()
299  );
300 
301  $property = $translated ? 'selectOptions' : 'untranslatedSelectOptions';
303  return $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()][$property][$propertyPath];
304  }
305 
311  ‪ValidationDto $dto
312  ): string {
313  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
314  $dto->‪getPrototypeName()
315  );
316 
317  $propertyPath = $dto->‪getPropertyPath();
318  $multiValueProperties = $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['multiValueProperties'] ?? [];
319  foreach ($multiValueProperties as $multiValueProperty) {
320  if (strpos($propertyPath, $multiValueProperty) === 0) {
321  $propertyPath = $multiValueProperty;
322  continue;
323  }
324  }
325 
326  return $propertyPath;
327  }
328 
334  ‪ValidationDto $dto
335  ): string {
336  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
337  $dto->‪getPrototypeName()
338  );
339 
340  $propertyPath = $dto->‪getPropertyPath();
341  $multiValueProperties = $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['multiValueProperties'] ?? [];
342  foreach ($multiValueProperties as $multiValueProperty) {
343  if (strpos($propertyPath, $multiValueProperty) === 0) {
344  $propertyPath = $multiValueProperty;
345  continue;
346  }
347  }
348 
349  return $propertyPath;
350  }
351 
364  ‪ValidationDto $dto
365  ): bool {
366  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
367  $dto->‪getPrototypeName()
368  );
369  return isset(
370  $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['predefinedDefaults'][$dto->‪getPropertyPath()]
371  );
372  }
373 
385  public function ‪getFormElementPredefinedDefaultValueFromFormEditorSetup(‪ValidationDto $dto, bool $translated = true)
386  {
388  throw new ‪PropertyException(
389  sprintf(
390  'No predefinedDefaults found for form element type "%s" and property path "%s"',
391  $dto->‪getFormElementType(),
392  $dto->‪getPropertyPath()
393  ),
394  1528578401
395  );
396  }
397 
398  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
399  $dto->‪getPrototypeName()
400  );
401 
402  $property = $translated ? 'predefinedDefaults' : 'untranslatedPredefinedDefaults';
403  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()][$property][$dto->‪getPropertyPath()];
404  }
405 
418  ‪ValidationDto $dto
419  ): bool {
420  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
421  $dto->‪getPrototypeName()
422  );
423  return isset(
424  $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['predefinedDefaults'][$dto->‪getPropertyPath()]
425  );
426  }
427 
439  public function ‪getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup(‪ValidationDto $dto, bool $translated = true)
440  {
442  throw new ‪PropertyException(
443  sprintf(
444  'No predefinedDefaults found for property collection "%s" and identifier "%s" and property path "%s"',
447  $dto->‪getPropertyPath()
448  ),
449  1528578402
450  );
451  }
452 
453  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
454  $dto->‪getPrototypeName()
455  );
456 
457  $property = $translated ? 'predefinedDefaults' : 'untranslatedPredefinedDefaults';
458  return $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()][$property][$dto->‪getPropertyPath()];
459  }
460 
474  {
475  if ($dto->‪getFormElementType() === 'Form') {
476  return true;
477  }
478  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
479  $dto->‪getPrototypeName()
480  );
481  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['creatable'] ?? false;
482  }
483 
498  {
499  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
500  $dto->‪getPrototypeName()
501  );
502  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['creatable'] ?? false;
503  }
504 
512  public function ‪isFormElementTypeDefinedInFormSetup(‪ValidationDto $dto): bool
513  {
514  $prototypeConfiguration = $this->‪getPrototypeConfiguration($dto->‪getPrototypeName());
516  $prototypeConfiguration,
517  'formElementsDefinition.' . $dto->‪getFormElementType(),
518  '.'
519  );
520  }
521 
528  public function ‪getAllBackendTranslationsForTranslationKeys(array $keys, string $prototypeName): array
529  {
530  $translations = [];
531  foreach ($keys as $key) {
532  if (!is_string($key)) {
533  continue;
534  }
535 
536  $translations[$key] = $this->‪getAllBackendTranslationsForTranslationKey($key, $prototypeName);
537  }
538 
539  return $translations;
540  }
541 
547  public function ‪getAllBackendTranslationsForTranslationKey(string $key, string $prototypeName): array
548  {
549  $prototypeConfiguration = $this->‪getPrototypeConfiguration($prototypeName);
550 
552  $key,
553  [],
554  $prototypeConfiguration['formEditor']['translationFiles'] ?? []
555  );
556  }
557 
565  protected function ‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(string $prototypeName): array
566  {
567  $cacheKey = implode('_', ['buildFormDefinitionValidationConfigurationFromFormEditorSetup', $prototypeName]);
568  $configuration = $this->‪getCacheEntry($cacheKey);
569 
570  if ($configuration === null) {
571  $prototypeConfiguration = $this->‪getPrototypeConfiguration($prototypeName);
572  $extractorDto = GeneralUtility::makeInstance(ExtractorDto::class, $prototypeConfiguration);
573 
574  GeneralUtility::makeInstance(ArrayProcessor::class, $prototypeConfiguration)->forEach(
575  GeneralUtility::makeInstance(
576  ArrayProcessing::class,
577  'formElementPropertyPaths',
578  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.(propertyPath|.*\.propertyPath)$',
579  GeneralUtility::makeInstance(PropertyPathsExtractor::class, $extractorDto)
580  ),
581  GeneralUtility::makeInstance(
582  ArrayProcessing::class,
583  'formElementAdditionalElementPropertyPaths',
584  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.additionalElementPropertyPaths\.([\d]+)',
585  GeneralUtility::makeInstance(AdditionalElementPropertyPathsExtractor::class, $extractorDto)
586  ),
587  GeneralUtility::makeInstance(
588  ArrayProcessing::class,
589  'formElementRelativeMultiValueProperties',
590  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.templateName$',
591  GeneralUtility::makeInstance(MultiValuePropertiesExtractor::class, $extractorDto)
592  ),
593  GeneralUtility::makeInstance(
594  ArrayProcessing::class,
595  'formElementSelectOptions',
596  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.selectOptions\.([\d]+)\.value$',
597  GeneralUtility::makeInstance(SelectOptionsExtractor::class, $extractorDto)
598  ),
599  GeneralUtility::makeInstance(
600  ArrayProcessing::class,
601  'formElementPredefinedDefaults',
602  '^formElementsDefinition\.(.*)\.formEditor\.predefinedDefaults\.(.+)$',
603  GeneralUtility::makeInstance(PredefinedDefaultsExtractor::class, $extractorDto)
604  ),
605  GeneralUtility::makeInstance(
606  ArrayProcessing::class,
607  'formElementCreatable',
608  '^formElementsDefinition\.(.*)\.formEditor.group$',
609  GeneralUtility::makeInstance(IsCreatableFormElementExtractor::class, $extractorDto)
610  ),
611  GeneralUtility::makeInstance(
612  ArrayProcessing::class,
613  'propertyCollectionCreatable',
614  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.templateName$',
615  GeneralUtility::makeInstance(IsCreatablePropertyCollectionElementExtractor::class, $extractorDto)
616  ),
617  GeneralUtility::makeInstance(
618  ArrayProcessing::class,
619  'propertyCollectionPropertyPaths',
620  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.(propertyPath|.*\.propertyPath)$',
621  GeneralUtility::makeInstance(CollectionPropertyPathsExtractor::class, $extractorDto)
622  ),
623  GeneralUtility::makeInstance(
624  ArrayProcessing::class,
625  'propertyCollectionAdditionalElementPropertyPaths',
626  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.additionalElementPropertyPaths\.([\d]+)',
627  GeneralUtility::makeInstance(AdditionalElementPropertyPathsExtractor::class, $extractorDto)
628  ),
629  GeneralUtility::makeInstance(
630  ArrayProcessing::class,
631  'propertyCollectionRelativeMultiValueProperties',
632  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.templateName$',
633  GeneralUtility::makeInstance(CollectionMultiValuePropertiesExtractor::class, $extractorDto)
634  ),
635  GeneralUtility::makeInstance(
636  ArrayProcessing::class,
637  'propertyCollectionSelectOptions',
638  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.selectOptions\.([\d]+)\.value$',
639  GeneralUtility::makeInstance(CollectionSelectOptionsExtractor::class, $extractorDto)
640  ),
641  GeneralUtility::makeInstance(
642  ArrayProcessing::class,
643  'propertyCollectionPredefinedDefaults',
644  '^(validatorsDefinition|finishersDefinition)\.(.*)\.formEditor\.predefinedDefaults\.(.+)$',
645  GeneralUtility::makeInstance(CollectionPredefinedDefaultsExtractor::class, $extractorDto)
646  )
647  );
648  $configuration = $extractorDto->getResult();
649 
650  $configuration = $this->‪translateValues($prototypeConfiguration, $configuration);
651 
653  $prototypeName,
654  $configuration
655  );
656 
657  $this->‪setCacheEntry($cacheKey, $configuration);
658  }
659 
660  return $configuration;
661  }
662 
694  string $prototypeName,
695  array $configuration
696  ): array {
697  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['buildFormDefinitionValidationConfiguration'] ?? [] as $className) {
698  $hookObj = GeneralUtility::makeInstance($className);
699  if (method_exists($hookObj, 'addAdditionalPropertyPaths')) {
700  $validationDto = GeneralUtility::makeInstance(ValidationDto::class, $prototypeName);
701  $propertyPathsFromHook = $hookObj->addAdditionalPropertyPaths($validationDto);
702  if (!is_array($propertyPathsFromHook)) {
703  $message = 'Return value of "%s->addAdditionalPropertyPaths() must be type "array"';
704  throw new ‪PropertyException(sprintf($message, $className), 1528633965);
705  }
706  $configuration = $this->‪addAdditionalPropertyPathsFromHook(
707  $className,
708  $prototypeName,
709  $propertyPathsFromHook,
710  $configuration
711  );
712  }
713  }
714 
715  return $configuration;
716  }
717 
726  protected function ‪addAdditionalPropertyPathsFromHook(
727  string $hookClassName,
728  string $prototypeName,
729  array $propertyPathsFromHook,
730  array $configuration
731  ): array {
732  foreach ($propertyPathsFromHook as $index => $validationDto) {
733  if (!($validationDto instanceof ‪ValidationDto)) {
734  $message = 'Return value of "%s->addAdditionalPropertyPaths()[%s] must be an instance of "%s"';
735  throw new ‪PropertyException(
736  sprintf($message, $hookClassName, $index, ValidationDto::class),
737  1528633966
738  );
739  }
740 
741  if ($validationDto->getPrototypeName() !== $prototypeName) {
742  $message = 'The prototype name "%s" does not match "%s" on "%s->addAdditionalPropertyPaths()[%s]';
743  throw new ‪PropertyException(
744  sprintf(
745  $message,
746  $validationDto->getPrototypeName(),
747  $prototypeName,
748  $hookClassName,
749  $index,
750  ValidationDto::class
751  ),
752  1528634966
753  );
754  }
755 
756  $formElementType = $validationDto->getFormElementType();
757  if (!$this->‪isFormElementTypeDefinedInFormSetup($validationDto)) {
758  $message = 'Form element type "%s" does not exist in prototype configuration "%s"';
759  throw new ‪PropertyException(
760  sprintf($message, $formElementType, $validationDto->getPrototypeName()),
761  1528633967
762  );
763  }
764 
765  if ($validationDto->hasPropertyCollectionName() &&
766  $validationDto->hasPropertyCollectionElementIdentifier()) {
767  $propertyCollectionName = $validationDto->getPropertyCollectionName();
768  $propertyCollectionElementIdentifier = $validationDto->getPropertyCollectionElementIdentifier();
769 
770  if ($propertyCollectionName !== 'finishers' && $propertyCollectionName !== 'validators') {
771  $message = 'The property collection name "%s" for form element "%s" must be "finishers" or "validators"';
772  throw new ‪PropertyException(
773  sprintf($message, $propertyCollectionName, $formElementType),
774  1528636941
775  );
776  }
777 
778  $configuration['formElements'][$formElementType]['collections'][$propertyCollectionName][$propertyCollectionElementIdentifier]['additionalPropertyPaths'][]
779  = $validationDto->getPropertyPath();
780  } else {
781  $configuration['formElements'][$formElementType]['additionalPropertyPaths'][]
782  = $validationDto->getPropertyPath();
783  }
784  }
785 
786  return $configuration;
787  }
788 
794  protected function ‪isPropertyDefinedInFormEditorSetup(string $propertyPath, array $subConfig): bool
795  {
796  if (empty($subConfig)) {
797  return false;
798  }
799  if (
800  in_array($propertyPath, $subConfig['propertyPaths'] ?? [], true)
801  || in_array($propertyPath, $subConfig['additionalElementPropertyPaths'] ?? [], true)
802  || in_array($propertyPath, $subConfig['additionalPropertyPaths'] ?? [], true)
803  ) {
804  return true;
805  }
806  foreach ($subConfig['multiValueProperties'] ?? [] as $relativeMultiValueProperty) {
807  if (strpos($propertyPath, $relativeMultiValueProperty) === 0) {
808  return true;
809  }
810  }
811 
812  return false;
813  }
814 
820  protected function ‪translateValues(array $prototypeConfiguration, array $configuration): array
821  {
822  if (isset($configuration['formElements'])) {
823  $configuration['formElements'] = $this->‪translatePredefinedDefaults(
824  $prototypeConfiguration,
825  $configuration['formElements']
826  );
827 
828  $configuration['formElements'] = $this->‪translateSelectOptions(
829  $prototypeConfiguration,
830  $configuration['formElements']
831  );
832  }
833 
834  foreach ($configuration['collections'] ?? [] as $name => $collections) {
835  $configuration['collections'][$name] = $this->‪translatePredefinedDefaults($prototypeConfiguration, $collections);
836  $configuration['collections'][$name] = $this->‪translateSelectOptions($prototypeConfiguration, $configuration['collections'][$name]);
837  }
838  return $configuration;
839  }
840 
846  protected function ‪translatePredefinedDefaults(array $prototypeConfiguration, array $formElements): array
847  {
848  foreach ($formElements ?? [] as $name => $formElement) {
849  if (!isset($formElement['predefinedDefaults'])) {
850  continue;
851  }
852  $formElement['untranslatedPredefinedDefaults'] = $formElement['predefinedDefaults'];
853  $formElement['predefinedDefaults'] = $this->‪getTranslationService()->‪translateValuesRecursive(
854  $formElement['predefinedDefaults'],
855  $prototypeConfiguration['formEditor']['translationFiles'] ?? []
856  );
857  $formElements[$name] = $formElement;
858  }
859  return $formElements;
860  }
861 
867  protected function ‪translateSelectOptions(array $prototypeConfiguration, array $formElements): array
868  {
869  foreach ($formElements ?? [] as $name => $formElement) {
870  if (empty($formElement['selectOptions']) || !is_array($formElement['selectOptions'])) {
871  continue;
872  }
873  $formElement['untranslatedSelectOptions'] = $formElement['selectOptions'];
874 
875  $formElement['selectOptions'] = $this->‪getTranslationService()->‪translateValuesRecursive(
876  $formElement['selectOptions'],
877  $prototypeConfiguration['formEditor']['translationFiles'] ?? []
878  );
879  $formElements[$name] = $formElement;
880  }
881  return $formElements;
882  }
883 
888  protected function ‪getCacheEntry(string $cacheKey)
889  {
890  if (isset($this->firstLevelCache[$cacheKey])) {
891  return $this->firstLevelCache[$cacheKey];
892  }
893  $cacheValue = $this->‪getCacheFrontend()->‪get('form_' . $cacheKey);
894  return $cacheValue === false ? null : $cacheValue;
895  }
896 
901  protected function ‪setCacheEntry(string $cacheKey, $value): void
902  {
903  $this->‪getCacheFrontend()->‪set('form_' . $cacheKey, $value);
904  $this->firstLevelCache[$cacheKey] = $value;
905  }
906 
910  protected function ‪getTranslationService(): ‪TranslationService
911  {
912  return $this->translationService instanceof ‪TranslationService
913  ? $this->translationService
915  }
916 
920  protected function ‪getCacheFrontend(): ‪FrontendInterface
921  {
922  return GeneralUtility::makeInstance(CacheManager::class)->getCache('assets');
923  }
924 }
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPrototypeName
‪string getPrototypeName()
Definition: ValidationDto.php:76
‪TYPO3\CMS\Form\Service\TranslationService\getInstance
‪static TranslationService getInstance()
Definition: TranslationService.php:83
‪TYPO3\CMS\Extbase\Property\Exception
Definition: DuplicateObjectException.php:18
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getBasePropertyPathFromMultiValueFormElementProperty
‪string getBasePropertyPathFromMultiValueFormElementProperty(ValidationDto $dto)
Definition: ConfigurationService.php:307
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup
‪bool isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:414
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\PredefinedDefaultsExtractor
Definition: PredefinedDefaultsExtractor.php:26
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\PropertyCollectionElement\MultiValuePropertiesExtractor
Definition: MultiValuePropertiesExtractor.php:27
‪TYPO3\CMS\Form\Domain\Configuration
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\formElementPropertyHasLimitedAllowedValuesDefinedWithinFormEditorSetup
‪bool formElementPropertyHasLimitedAllowedValuesDefinedWithinFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:200
‪TYPO3\CMS\Form\Service\TranslationService
Definition: TranslationService.php:44
‪TYPO3\CMS\Form\Domain\Configuration\Exception\PrototypeNotFoundException
Definition: PrototypeNotFoundException.php:26
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\translatePredefinedDefaults
‪array translatePredefinedDefaults(array $prototypeConfiguration, array $formElements)
Definition: ConfigurationService.php:843
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\MultiValuePropertiesExtractor
Definition: MultiValuePropertiesExtractor.php:27
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getAllowedValuesForPropertyCollectionPropertyFromFormEditorSetup
‪array getAllowedValuesForPropertyCollectionPropertyFromFormEditorSetup(ValidationDto $dto, bool $translated=true)
Definition: ConfigurationService.php:278
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto
Definition: ValidationDto.php:23
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isFormElementTypeCreatableByFormEditor
‪bool isFormElementTypeCreatableByFormEditor(ValidationDto $dto)
Definition: ConfigurationService.php:470
‪TYPO3\CMS\Core\Utility\ArrayUtility\isValidPath
‪static bool isValidPath(array $array, $path, $delimiter='/')
Definition: ArrayUtility.php:144
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getAllBackendTranslationsForTranslationKeys
‪array getAllBackendTranslationsForTranslationKeys(array $keys, string $prototypeName)
Definition: ConfigurationService.php:525
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isPropertyCollectionElementIdentifierCreatableByFormEditor
‪bool isPropertyCollectionElementIdentifierCreatableByFormEditor(ValidationDto $dto)
Definition: ConfigurationService.php:494
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getBasePropertyPathFromMultiValuePropertyCollectionElement
‪string getBasePropertyPathFromMultiValuePropertyCollectionElement(ValidationDto $dto)
Definition: ConfigurationService.php:330
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getFormElementPredefinedDefaultValueFromFormEditorSetup
‪mixed getFormElementPredefinedDefaultValueFromFormEditorSetup(ValidationDto $dto, bool $translated=true)
Definition: ConfigurationService.php:382
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\ExtractorDto
Definition: ExtractorDto.php:24
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup
‪bool isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:360
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getCacheFrontend
‪FrontendInterface getCacheFrontend()
Definition: ConfigurationService.php:917
‪TYPO3\CMS\Form\Service\TranslationService\translateValuesRecursive
‪array translateValuesRecursive(array $array, array $translationFiles=[])
Definition: TranslationService.php:179
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPropertyPath
‪string getPropertyPath()
Definition: ValidationDto.php:100
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\executeBuildFormDefinitionValidationConfigurationHooks
‪array executeBuildFormDefinitionValidationConfigurationHooks(string $prototypeName, array $configuration)
Definition: ConfigurationService.php:690
‪TYPO3\CMS\Form\Domain\Configuration\ArrayProcessing\ArrayProcessing
Definition: ArrayProcessing.php:27
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\$translationService
‪TranslationService $translationService
Definition: ConfigurationService.php:63
‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface\get
‪mixed get($entryIdentifier)
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\initializeObject
‪initializeObject()
Definition: ConfigurationService.php:68
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\$firstLevelCache
‪array $firstLevelCache
Definition: ConfigurationService.php:59
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isPropertyDefinedInFormEditorSetup
‪bool isPropertyDefinedInFormEditorSetup(string $propertyPath, array $subConfig)
Definition: ConfigurationService.php:791
‪TYPO3\CMS\Form\Domain\Configuration\ArrayProcessing\ArrayProcessor
Definition: ArrayProcessor.php:30
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isFormElementTypeDefinedInFormSetup
‪bool isFormElementTypeDefinedInFormSetup(ValidationDto $dto)
Definition: ConfigurationService.php:509
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\$formSettings
‪array $formSettings
Definition: ConfigurationService.php:55
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPropertyCollectionElementIdentifier
‪string getPropertyCollectionElementIdentifier()
Definition: ValidationDto.php:116
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\PropertyCollectionElement\PropertyPathsExtractor
Definition: PropertyPathsExtractor.php:27
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getAllowedValuesForFormElementPropertyFromFormEditorSetup
‪array getAllowedValuesForFormElementPropertyFromFormEditorSetup(ValidationDto $dto, bool $translated=true)
Definition: ConfigurationService.php:222
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isPropertyCollectionPropertyDefinedInFormEditorSetup
‪bool isPropertyCollectionPropertyDefinedInFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:180
‪TYPO3\CMS\Core\Cache\CacheManager
Definition: CacheManager.php:35
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getSelectablePrototypeNamesDefinedInFormEditorSetup
‪array getSelectablePrototypeNamesDefinedInFormEditorSetup()
Definition: ConfigurationService.php:99
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getFormElementType
‪string getFormElementType()
Definition: ValidationDto.php:84
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\PropertyCollectionElement\PredefinedDefaultsExtractor
Definition: PredefinedDefaultsExtractor.php:26
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getTranslationService
‪TranslationService getTranslationService()
Definition: ConfigurationService.php:907
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService
Definition: ConfigurationService.php:51
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\buildFormDefinitionValidationConfigurationFromFormEditorSetup
‪array buildFormDefinitionValidationConfigurationFromFormEditorSetup(string $prototypeName)
Definition: ConfigurationService.php:562
‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
Definition: FrontendInterface.php:22
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isFormElementPropertyDefinedInFormEditorSetup
‪bool isFormElementPropertyDefinedInFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:145
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\SelectOptionsExtractor
Definition: SelectOptionsExtractor.php:27
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\IsCreatableFormElementExtractor
Definition: IsCreatableFormElementExtractor.php:27
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\translateSelectOptions
‪array translateSelectOptions(array $prototypeConfiguration, array $formElements)
Definition: ConfigurationService.php:864
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\PropertyCollectionElement\SelectOptionsExtractor
Definition: SelectOptionsExtractor.php:27
‪TYPO3\CMS\Core\Utility\ArrayUtility
Definition: ArrayUtility.php:24
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getCacheEntry
‪mixed getCacheEntry(string $cacheKey)
Definition: ConfigurationService.php:885
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:23
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getPrototypeConfiguration
‪array getPrototypeConfiguration(string $prototypeName)
Definition: ConfigurationService.php:82
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\AdditionalElementPropertyPathsExtractor
Definition: AdditionalElementPropertyPathsExtractor.php:24
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup
‪mixed getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup(ValidationDto $dto, bool $translated=true)
Definition: ConfigurationService.php:436
‪TYPO3\CMS\Form\Mvc\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_YAML_SETTINGS
‪const CONFIGURATION_TYPE_YAML_SETTINGS
Definition: ConfigurationManagerInterface.php:30
‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface\set
‪set($entryIdentifier, $data, array $tags=[], $lifetime=null)
‪TYPO3\CMS\Form\Service\TranslationService\translateToAllBackendLanguages
‪array translateToAllBackendLanguages(string $key, array $arguments=null, array $translationFiles=[])
Definition: TranslationService.php:211
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Form\Domain\Configuration\Exception\PropertyException
Definition: PropertyException.php:26
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\translateValues
‪array translateValues(array $prototypeConfiguration, array $configuration)
Definition: ConfigurationService.php:817
‪TYPO3\CMS\Extbase\Object\ObjectManager
Definition: ObjectManager.php:28
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\PropertyPathsExtractor
Definition: PropertyPathsExtractor.php:27
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPropertyCollectionName
‪string getPropertyCollectionName()
Definition: ValidationDto.php:108
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\propertyCollectionPropertyHasLimitedAllowedValuesDefinedWithinFormEditorSetup
‪bool propertyCollectionPropertyHasLimitedAllowedValuesDefinedWithinFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:256
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getAllBackendTranslationsForTranslationKey
‪array getAllBackendTranslationsForTranslationKey(string $key, string $prototypeName)
Definition: ConfigurationService.php:544
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\PropertyCollectionElement\IsCreatablePropertyCollectionElementExtractor
Definition: IsCreatablePropertyCollectionElementExtractor.php:27
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\addAdditionalPropertyPathsFromHook
‪array addAdditionalPropertyPathsFromHook(string $hookClassName, string $prototypeName, array $propertyPathsFromHook, array $configuration)
Definition: ConfigurationService.php:723
‪TYPO3\CMS\Form\Mvc\Configuration\ConfigurationManagerInterface
Definition: ConfigurationManagerInterface.php:29
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\setCacheEntry
‪setCacheEntry(string $cacheKey, $value)
Definition: ConfigurationService.php:898