‪TYPO3CMS  11.5
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 
44 
50 {
54  protected ‪$formSettings;
55 
59  protected ‪$firstLevelCache = [];
60 
64  protected ‪$translationService;
65 
66  public function ‪__construct(‪ConfigurationManagerInterface $configurationManager)
67  {
68  $this->formSettings = $configurationManager->‪getConfiguration(‪ConfigurationManagerInterface::CONFIGURATION_TYPE_YAML_SETTINGS, 'form');
69  }
70 
78  public function ‪getPrototypeConfiguration(string $prototypeName): array
79  {
80  if (!isset($this->formSettings['prototypes'][$prototypeName])) {
82  sprintf('The Prototype "%s" was not found.', $prototypeName),
83  1475924277
84  );
85  }
86  return $this->formSettings['prototypes'][$prototypeName];
87  }
88 
96  {
97  $returnValue = GeneralUtility::makeInstance(
98  ArrayProcessor::class,
99  $this->formSettings['formManager']['selectablePrototypesConfiguration'] ?? []
100  )->forEach(
101  GeneralUtility::makeInstance(
102  ArrayProcessing::class,
103  'selectablePrototypeNames',
104  '^([\d]+)\.identifier$',
105  static function ($_, $value) {
106  return $value;
107  }
108  )
109  );
110 
111  return array_values($returnValue['selectablePrototypeNames'] ?? []);
112  }
113 
142  {
143  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
144  $dto->‪getPrototypeName()
145  );
146 
147  $subConfig = $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()] ?? [];
148  return $this->‪isPropertyDefinedInFormEditorSetup($dto->‪getPropertyPath(), $subConfig);
149  }
150 
177  {
178  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
179  $dto->‪getPrototypeName()
180  );
181  $subConfig = $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()] ?? [];
182 
183  return $this->‪isPropertyDefinedInFormEditorSetup($dto->‪getPropertyPath(), $subConfig);
184  }
185 
197  ‪ValidationDto $dto
198  ): bool {
199  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
200  $dto->‪getPrototypeName()
201  );
202 
203  $propertyPath = $this->‪getBasePropertyPathFromMultiValueFormElementProperty($dto);
204  return isset(
205  $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['selectOptions'][$propertyPath]
206  );
207  }
208 
219  ‪ValidationDto $dto,
220  bool $translated = true
221  ): array {
223  throw new ‪PropertyException(
224  sprintf(
225  'No selectOptions found for form element type "%s" and property path "%s"',
226  $dto->‪getFormElementType(),
227  $dto->‪getPropertyPath()
228  ),
229  1614264312
230  );
231  }
232 
233  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
234  $dto->‪getPrototypeName()
235  );
236 
237  $property = $translated ? 'selectOptions' : 'untranslatedSelectOptions';
238  $propertyPath = $this->‪getBasePropertyPathFromMultiValueFormElementProperty($dto);
239  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()][$property][$propertyPath];
240  }
241 
253  ‪ValidationDto $dto
254  ): bool {
255  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
256  $dto->‪getPrototypeName()
257  );
258 
260  return isset(
261  $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['selectOptions'][$propertyPath]
262  );
263  }
264 
275  ‪ValidationDto $dto,
276  bool $translated = true
277  ): array {
279  throw new ‪PropertyException(
280  sprintf(
281  'No selectOptions found for property collection "%s" and identifier "%s" and property path "%s"',
284  $dto->‪getPropertyPath()
285  ),
286  1614264313
287  );
288  }
289 
290  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
291  $dto->‪getPrototypeName()
292  );
293 
294  $property = $translated ? 'selectOptions' : 'untranslatedSelectOptions';
296  return $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()][$property][$propertyPath];
297  }
298 
304  ‪ValidationDto $dto
305  ): string {
306  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
307  $dto->‪getPrototypeName()
308  );
309 
310  $propertyPath = $dto->‪getPropertyPath();
311  $multiValueProperties = $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['multiValueProperties'] ?? [];
312  foreach ($multiValueProperties as $multiValueProperty) {
313  if (strpos($propertyPath, $multiValueProperty) === 0) {
314  $propertyPath = $multiValueProperty;
315  continue;
316  }
317  }
318 
319  return $propertyPath;
320  }
321 
327  ‪ValidationDto $dto
328  ): string {
329  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
330  $dto->‪getPrototypeName()
331  );
332 
333  $propertyPath = $dto->‪getPropertyPath();
334  $multiValueProperties = $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['multiValueProperties'] ?? [];
335  foreach ($multiValueProperties as $multiValueProperty) {
336  if (strpos($propertyPath, $multiValueProperty) === 0) {
337  $propertyPath = $multiValueProperty;
338  continue;
339  }
340  }
341 
342  return $propertyPath;
343  }
344 
357  ‪ValidationDto $dto
358  ): bool {
359  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
360  $dto->‪getPrototypeName()
361  );
362  return isset(
363  $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['predefinedDefaults'][$dto->‪getPropertyPath()]
364  );
365  }
366 
378  public function ‪getFormElementPredefinedDefaultValueFromFormEditorSetup(‪ValidationDto $dto, bool $translated = true)
379  {
381  throw new ‪PropertyException(
382  sprintf(
383  'No predefinedDefaults found for form element type "%s" and property path "%s"',
384  $dto->‪getFormElementType(),
385  $dto->‪getPropertyPath()
386  ),
387  1528578401
388  );
389  }
390 
391  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
392  $dto->‪getPrototypeName()
393  );
394 
395  $property = $translated ? 'predefinedDefaults' : 'untranslatedPredefinedDefaults';
396  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()][$property][$dto->‪getPropertyPath()];
397  }
398 
411  ‪ValidationDto $dto
412  ): bool {
413  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
414  $dto->‪getPrototypeName()
415  );
416  return isset(
417  $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['predefinedDefaults'][$dto->‪getPropertyPath()]
418  );
419  }
420 
432  public function ‪getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup(‪ValidationDto $dto, bool $translated = true)
433  {
435  throw new ‪PropertyException(
436  sprintf(
437  'No predefinedDefaults found for property collection "%s" and identifier "%s" and property path "%s"',
440  $dto->‪getPropertyPath()
441  ),
442  1528578402
443  );
444  }
445 
446  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
447  $dto->‪getPrototypeName()
448  );
449 
450  $property = $translated ? 'predefinedDefaults' : 'untranslatedPredefinedDefaults';
451  return $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()][$property][$dto->‪getPropertyPath()];
452  }
453 
467  {
468  if ($dto->‪getFormElementType() === 'Form') {
469  return true;
470  }
471  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
472  $dto->‪getPrototypeName()
473  );
474  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['creatable'] ?? false;
475  }
476 
491  {
492  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
493  $dto->‪getPrototypeName()
494  );
495  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['creatable'] ?? false;
496  }
497 
505  public function ‪isFormElementTypeDefinedInFormSetup(‪ValidationDto $dto): bool
506  {
507  $prototypeConfiguration = $this->‪getPrototypeConfiguration($dto->‪getPrototypeName());
509  $prototypeConfiguration,
510  'formElementsDefinition.' . $dto->‪getFormElementType(),
511  '.'
512  );
513  }
514 
521  public function ‪getAllBackendTranslationsForTranslationKeys(array $keys, string $prototypeName): array
522  {
523  $translations = [];
524  foreach ($keys as $key) {
525  if (!is_string($key)) {
526  continue;
527  }
528 
529  $translations[$key] = $this->‪getAllBackendTranslationsForTranslationKey($key, $prototypeName);
530  }
531 
532  return $translations;
533  }
534 
540  public function ‪getAllBackendTranslationsForTranslationKey(string $key, string $prototypeName): array
541  {
542  $prototypeConfiguration = $this->‪getPrototypeConfiguration($prototypeName);
543 
545  $key,
546  [],
547  $prototypeConfiguration['formEditor']['translationFiles'] ?? []
548  );
549  }
550 
558  protected function ‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(string $prototypeName): array
559  {
560  $cacheKey = implode('_', ['buildFormDefinitionValidationConfigurationFromFormEditorSetup', $prototypeName]);
561  $configuration = $this->‪getCacheEntry($cacheKey);
562 
563  if ($configuration === null) {
564  $prototypeConfiguration = $this->‪getPrototypeConfiguration($prototypeName);
565  $extractorDto = GeneralUtility::makeInstance(ExtractorDto::class, $prototypeConfiguration);
566 
567  GeneralUtility::makeInstance(ArrayProcessor::class, $prototypeConfiguration)->forEach(
568  GeneralUtility::makeInstance(
569  ArrayProcessing::class,
570  'formElementPropertyPaths',
571  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.(propertyPath|.*\.propertyPath)$',
572  GeneralUtility::makeInstance(PropertyPathsExtractor::class, $extractorDto)
573  ),
574  GeneralUtility::makeInstance(
575  ArrayProcessing::class,
576  'formElementAdditionalElementPropertyPaths',
577  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.additionalElementPropertyPaths\.([\d]+)',
578  GeneralUtility::makeInstance(AdditionalElementPropertyPathsExtractor::class, $extractorDto)
579  ),
580  GeneralUtility::makeInstance(
581  ArrayProcessing::class,
582  'formElementRelativeMultiValueProperties',
583  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.templateName$',
584  GeneralUtility::makeInstance(MultiValuePropertiesExtractor::class, $extractorDto)
585  ),
586  GeneralUtility::makeInstance(
587  ArrayProcessing::class,
588  'formElementSelectOptions',
589  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.selectOptions\.([\d]+)\.value$',
590  GeneralUtility::makeInstance(SelectOptionsExtractor::class, $extractorDto)
591  ),
592  GeneralUtility::makeInstance(
593  ArrayProcessing::class,
594  'formElementPredefinedDefaults',
595  '^formElementsDefinition\.(.*)\.formEditor\.predefinedDefaults\.(.+)$',
596  GeneralUtility::makeInstance(PredefinedDefaultsExtractor::class, $extractorDto)
597  ),
598  GeneralUtility::makeInstance(
599  ArrayProcessing::class,
600  'formElementCreatable',
601  '^formElementsDefinition\.(.*)\.formEditor.group$',
602  GeneralUtility::makeInstance(IsCreatableFormElementExtractor::class, $extractorDto)
603  ),
604  GeneralUtility::makeInstance(
605  ArrayProcessing::class,
606  'propertyCollectionCreatable',
607  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.templateName$',
608  GeneralUtility::makeInstance(IsCreatablePropertyCollectionElementExtractor::class, $extractorDto)
609  ),
610  GeneralUtility::makeInstance(
611  ArrayProcessing::class,
612  'propertyCollectionPropertyPaths',
613  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.(propertyPath|.*\.propertyPath)$',
614  GeneralUtility::makeInstance(CollectionPropertyPathsExtractor::class, $extractorDto)
615  ),
616  GeneralUtility::makeInstance(
617  ArrayProcessing::class,
618  'propertyCollectionAdditionalElementPropertyPaths',
619  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.additionalElementPropertyPaths\.([\d]+)',
620  GeneralUtility::makeInstance(AdditionalElementPropertyPathsExtractor::class, $extractorDto)
621  ),
622  GeneralUtility::makeInstance(
623  ArrayProcessing::class,
624  'propertyCollectionRelativeMultiValueProperties',
625  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.templateName$',
626  GeneralUtility::makeInstance(CollectionMultiValuePropertiesExtractor::class, $extractorDto)
627  ),
628  GeneralUtility::makeInstance(
629  ArrayProcessing::class,
630  'propertyCollectionSelectOptions',
631  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.selectOptions\.([\d]+)\.value$',
632  GeneralUtility::makeInstance(CollectionSelectOptionsExtractor::class, $extractorDto)
633  ),
634  GeneralUtility::makeInstance(
635  ArrayProcessing::class,
636  'propertyCollectionPredefinedDefaults',
637  '^(validatorsDefinition|finishersDefinition)\.(.*)\.formEditor\.predefinedDefaults\.(.+)$',
638  GeneralUtility::makeInstance(CollectionPredefinedDefaultsExtractor::class, $extractorDto)
639  )
640  );
641  $configuration = $extractorDto->getResult();
642 
643  $configuration = $this->‪translateValues($prototypeConfiguration, $configuration);
644 
646  $prototypeName,
647  $configuration
648  );
649 
650  $this->‪setCacheEntry($cacheKey, $configuration);
651  }
652 
653  return $configuration;
654  }
655 
687  string $prototypeName,
688  array $configuration
689  ): array {
690  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['buildFormDefinitionValidationConfiguration'] ?? [] as $className) {
691  $hookObj = GeneralUtility::makeInstance($className);
692  if (method_exists($hookObj, 'addAdditionalPropertyPaths')) {
693  $validationDto = GeneralUtility::makeInstance(ValidationDto::class, $prototypeName);
694  $propertyPathsFromHook = $hookObj->addAdditionalPropertyPaths($validationDto);
695  if (!is_array($propertyPathsFromHook)) {
696  $message = 'Return value of "%s->addAdditionalPropertyPaths() must be type "array"';
697  throw new ‪PropertyException(sprintf($message, $className), 1528633965);
698  }
699  $configuration = $this->‪addAdditionalPropertyPathsFromHook(
700  $className,
701  $prototypeName,
702  $propertyPathsFromHook,
703  $configuration
704  );
705  }
706  }
707 
708  return $configuration;
709  }
710 
719  protected function ‪addAdditionalPropertyPathsFromHook(
720  string $hookClassName,
721  string $prototypeName,
722  array $propertyPathsFromHook,
723  array $configuration
724  ): array {
725  foreach ($propertyPathsFromHook as $index => $validationDto) {
726  if (!($validationDto instanceof ‪ValidationDto)) {
727  $message = 'Return value of "%s->addAdditionalPropertyPaths()[%s] must be an instance of "%s"';
728  throw new ‪PropertyException(
729  sprintf($message, $hookClassName, $index, ValidationDto::class),
730  1528633966
731  );
732  }
733 
734  if ($validationDto->getPrototypeName() !== $prototypeName) {
735  $message = 'The prototype name "%s" does not match "%s" on "%s->addAdditionalPropertyPaths()[%s]';
736  throw new ‪PropertyException(
737  sprintf(
738  $message,
739  $validationDto->getPrototypeName(),
740  $prototypeName,
741  $hookClassName,
742  $index,
743  ValidationDto::class
744  ),
745  1528634966
746  );
747  }
748 
749  $formElementType = $validationDto->getFormElementType();
750  if (!$this->‪isFormElementTypeDefinedInFormSetup($validationDto)) {
751  $message = 'Form element type "%s" does not exist in prototype configuration "%s"';
752  throw new ‪PropertyException(
753  sprintf($message, $formElementType, $validationDto->getPrototypeName()),
754  1528633967
755  );
756  }
757 
758  if ($validationDto->hasPropertyCollectionName() &&
759  $validationDto->hasPropertyCollectionElementIdentifier()) {
760  $propertyCollectionName = $validationDto->getPropertyCollectionName();
761  $propertyCollectionElementIdentifier = $validationDto->getPropertyCollectionElementIdentifier();
762 
763  if ($propertyCollectionName !== 'finishers' && $propertyCollectionName !== 'validators') {
764  $message = 'The property collection name "%s" for form element "%s" must be "finishers" or "validators"';
765  throw new ‪PropertyException(
766  sprintf($message, $propertyCollectionName, $formElementType),
767  1528636941
768  );
769  }
770 
771  $configuration['formElements'][$formElementType]['collections'][$propertyCollectionName][$propertyCollectionElementIdentifier]['additionalPropertyPaths'][]
772  = $validationDto->getPropertyPath();
773  } else {
774  $configuration['formElements'][$formElementType]['additionalPropertyPaths'][]
775  = $validationDto->getPropertyPath();
776  }
777  }
778 
779  return $configuration;
780  }
781 
787  protected function ‪isPropertyDefinedInFormEditorSetup(string $propertyPath, array $subConfig): bool
788  {
789  if (empty($subConfig)) {
790  return false;
791  }
792  if (
793  in_array($propertyPath, $subConfig['propertyPaths'] ?? [], true)
794  || in_array($propertyPath, $subConfig['additionalElementPropertyPaths'] ?? [], true)
795  || in_array($propertyPath, $subConfig['additionalPropertyPaths'] ?? [], true)
796  ) {
797  return true;
798  }
799  foreach ($subConfig['multiValueProperties'] ?? [] as $relativeMultiValueProperty) {
800  if (strpos($propertyPath, $relativeMultiValueProperty) === 0) {
801  return true;
802  }
803  }
804 
805  return false;
806  }
807 
813  protected function ‪translateValues(array $prototypeConfiguration, array $configuration): array
814  {
815  if (isset($configuration['formElements'])) {
816  $configuration['formElements'] = $this->‪translatePredefinedDefaults(
817  $prototypeConfiguration,
818  $configuration['formElements']
819  );
820 
821  $configuration['formElements'] = $this->‪translateSelectOptions(
822  $prototypeConfiguration,
823  $configuration['formElements']
824  );
825  }
826 
827  foreach ($configuration['collections'] ?? [] as $name => $collections) {
828  $configuration['collections'][$name] = $this->‪translatePredefinedDefaults($prototypeConfiguration, $collections);
829  $configuration['collections'][$name] = $this->‪translateSelectOptions($prototypeConfiguration, $configuration['collections'][$name]);
830  }
831  return $configuration;
832  }
833 
839  protected function ‪translatePredefinedDefaults(array $prototypeConfiguration, array $formElements): array
840  {
841  foreach ($formElements ?? [] as $name => $formElement) {
842  if (!isset($formElement['predefinedDefaults'])) {
843  continue;
844  }
845  $formElement['untranslatedPredefinedDefaults'] = $formElement['predefinedDefaults'];
846  $formElement['predefinedDefaults'] = $this->‪getTranslationService()->‪translateValuesRecursive(
847  $formElement['predefinedDefaults'],
848  $prototypeConfiguration['formEditor']['translationFiles'] ?? []
849  );
850  $formElements[$name] = $formElement;
851  }
852  return $formElements;
853  }
854 
860  protected function ‪translateSelectOptions(array $prototypeConfiguration, array $formElements): array
861  {
862  foreach ($formElements ?? [] as $name => $formElement) {
863  if (empty($formElement['selectOptions']) || !is_array($formElement['selectOptions'])) {
864  continue;
865  }
866  $formElement['untranslatedSelectOptions'] = $formElement['selectOptions'];
867 
868  $formElement['selectOptions'] = $this->‪getTranslationService()->‪translateValuesRecursive(
869  $formElement['selectOptions'],
870  $prototypeConfiguration['formEditor']['translationFiles'] ?? []
871  );
872  $formElements[$name] = $formElement;
873  }
874  return $formElements;
875  }
876 
881  protected function ‪getCacheEntry(string $cacheKey)
882  {
883  if (isset($this->firstLevelCache[$cacheKey])) {
884  return $this->firstLevelCache[$cacheKey];
885  }
886  $cacheValue = $this->‪getCacheFrontend()->‪get('form_' . $cacheKey);
887  return $cacheValue === false ? null : $cacheValue;
888  }
889 
894  protected function ‪setCacheEntry(string $cacheKey, $value): void
895  {
896  $this->‪getCacheFrontend()->‪set('form_' . $cacheKey, $value);
897  $this->firstLevelCache[$cacheKey] = $value;
898  }
899 
903  protected function ‪getTranslationService(): ‪TranslationService
904  {
905  return $this->translationService instanceof ‪TranslationService
906  ? $this->translationService
907  : GeneralUtility::makeInstance(TranslationService::class);
908  }
909 
913  protected function ‪getCacheFrontend(): ‪FrontendInterface
914  {
915  return GeneralUtility::makeInstance(CacheManager::class)->getCache('assets');
916  }
917 }
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPrototypeName
‪string getPrototypeName()
Definition: ValidationDto.php:75
‪TYPO3\CMS\Extbase\Property\Exception
Definition: DuplicateObjectException.php:18
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getBasePropertyPathFromMultiValueFormElementProperty
‪string getBasePropertyPathFromMultiValueFormElementProperty(ValidationDto $dto)
Definition: ConfigurationService.php:300
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup
‪bool isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:407
‪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:193
‪TYPO3\CMS\Form\Service\TranslationService
Definition: TranslationService.php:45
‪TYPO3\CMS\Form\Domain\Configuration\Exception\PrototypeNotFoundException
Definition: PrototypeNotFoundException.php:25
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\translatePredefinedDefaults
‪array translatePredefinedDefaults(array $prototypeConfiguration, array $formElements)
Definition: ConfigurationService.php:836
‪TYPO3\CMS\Form\Service\TranslationService\translateToAllBackendLanguages
‪array translateToAllBackendLanguages(string $key, ?array $arguments=null, array $translationFiles=[])
Definition: TranslationService.php:216
‪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:271
‪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:463
‪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:518
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isPropertyCollectionElementIdentifierCreatableByFormEditor
‪bool isPropertyCollectionElementIdentifierCreatableByFormEditor(ValidationDto $dto)
Definition: ConfigurationService.php:487
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getBasePropertyPathFromMultiValuePropertyCollectionElement
‪string getBasePropertyPathFromMultiValuePropertyCollectionElement(ValidationDto $dto)
Definition: ConfigurationService.php:323
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getFormElementPredefinedDefaultValueFromFormEditorSetup
‪mixed getFormElementPredefinedDefaultValueFromFormEditorSetup(ValidationDto $dto, bool $translated=true)
Definition: ConfigurationService.php:375
‪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:353
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getCacheFrontend
‪FrontendInterface getCacheFrontend()
Definition: ConfigurationService.php:910
‪TYPO3\CMS\Form\Service\TranslationService\translateValuesRecursive
‪array translateValuesRecursive(array $array, array $translationFiles=[])
Definition: TranslationService.php:184
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPropertyPath
‪string getPropertyPath()
Definition: ValidationDto.php:99
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\executeBuildFormDefinitionValidationConfigurationHooks
‪array executeBuildFormDefinitionValidationConfigurationHooks(string $prototypeName, array $configuration)
Definition: ConfigurationService.php:683
‪TYPO3\CMS\Form\Domain\Configuration\ArrayProcessing\ArrayProcessing
Definition: ArrayProcessing.php:27
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\$translationService
‪TranslationService $translationService
Definition: ConfigurationService.php:61
‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface\get
‪mixed get($entryIdentifier)
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\$firstLevelCache
‪array $firstLevelCache
Definition: ConfigurationService.php:57
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isPropertyDefinedInFormEditorSetup
‪bool isPropertyDefinedInFormEditorSetup(string $propertyPath, array $subConfig)
Definition: ConfigurationService.php:784
‪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:502
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\$formSettings
‪array $formSettings
Definition: ConfigurationService.php:53
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getPropertyCollectionElementIdentifier
‪string getPropertyCollectionElementIdentifier()
Definition: ValidationDto.php:115
‪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:215
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isPropertyCollectionPropertyDefinedInFormEditorSetup
‪bool isPropertyCollectionPropertyDefinedInFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:173
‪TYPO3\CMS\Core\Cache\CacheManager
Definition: CacheManager.php:36
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getSelectablePrototypeNamesDefinedInFormEditorSetup
‪array getSelectablePrototypeNamesDefinedInFormEditorSetup()
Definition: ConfigurationService.php:92
‪TYPO3\CMS\Form\Domain\Configuration\FormDefinition\Validators\ValidationDto\getFormElementType
‪string getFormElementType()
Definition: ValidationDto.php:83
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\PropertyCollectionElement\PredefinedDefaultsExtractor
Definition: PredefinedDefaultsExtractor.php:26
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\__construct
‪__construct(ConfigurationManagerInterface $configurationManager)
Definition: ConfigurationService.php:63
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getTranslationService
‪TranslationService getTranslationService()
Definition: ConfigurationService.php:900
‪TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\getConfiguration
‪array getConfiguration(string $configurationType, ?string $extensionName=null, ?string $pluginName=null)
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService
Definition: ConfigurationService.php:50
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\buildFormDefinitionValidationConfigurationFromFormEditorSetup
‪array buildFormDefinitionValidationConfigurationFromFormEditorSetup(string $prototypeName)
Definition: ConfigurationService.php:555
‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
Definition: FrontendInterface.php:22
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isFormElementPropertyDefinedInFormEditorSetup
‪bool isFormElementPropertyDefinedInFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:138
‪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:857
‪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:878
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:22
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getPrototypeConfiguration
‪array getPrototypeConfiguration(string $prototypeName)
Definition: ConfigurationService.php:75
‪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:429
‪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\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:50
‪TYPO3\CMS\Form\Domain\Configuration\Exception\PropertyException
Definition: PropertyException.php:25
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\translateValues
‪array translateValues(array $prototypeConfiguration, array $configuration)
Definition: ConfigurationService.php:810
‪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:107
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\propertyCollectionPropertyHasLimitedAllowedValuesDefinedWithinFormEditorSetup
‪bool propertyCollectionPropertyHasLimitedAllowedValuesDefinedWithinFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:249
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getAllBackendTranslationsForTranslationKey
‪array getAllBackendTranslationsForTranslationKey(string $key, string $prototypeName)
Definition: ConfigurationService.php:537
‪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:716
‪TYPO3\CMS\Form\Mvc\Configuration\ConfigurationManagerInterface
Definition: ConfigurationManagerInterface.php:29
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\setCacheEntry
‪setCacheEntry(string $cacheKey, $value)
Definition: ConfigurationService.php:891