‪TYPO3CMS  9.5
ConfigurationService.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 
43 
49 {
50 
54  protected ‪$formSettings;
55 
59  protected ‪$firstLevelCache = [];
60 
64  protected ‪$translationService;
65 
69  public function ‪initializeObject(): void
70  {
71  $this->formSettings = GeneralUtility::makeInstance(ObjectManager::class)
72  ->get(ConfigurationManagerInterface::class)
74  }
75 
83  public function ‪getPrototypeConfiguration(string $prototypeName): array
84  {
85  if (!isset($this->formSettings['prototypes'][$prototypeName])) {
87  sprintf('The Prototype "%s" was not found.', $prototypeName),
88  1475924277
89  );
90  }
91  return $this->formSettings['prototypes'][$prototypeName];
92  }
93 
101  {
102  $returnValue = GeneralUtility::makeInstance(
103  ArrayProcessor::class,
104  $this->formSettings['formManager']['selectablePrototypesConfiguration'] ?? []
105  )->forEach(
106  GeneralUtility::makeInstance(
107  ArrayProcessing::class,
108  'selectablePrototypeNames',
109  '^([\d]+)\.identifier$',
110  function ($_, $value) {
111  return $value;
112  }
113  )
114  );
115 
116  return array_values($returnValue['selectablePrototypeNames'] ?? []);
117  }
118 
147  {
148  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
149  $dto->‪getPrototypeName()
150  );
151 
152  $subConfig = $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()] ?? [];
153  return $this->‪isPropertyDefinedInFormEditorSetup($dto->‪getPropertyPath(), $subConfig);
154  }
155 
182  {
183  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
184  $dto->‪getPrototypeName()
185  );
186  $subConfig = $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()] ?? [];
187 
188  return $this->‪isPropertyDefinedInFormEditorSetup($dto->‪getPropertyPath(), $subConfig);
189  }
190 
202  ‪ValidationDto $dto
203  ): bool {
204  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
205  $dto->‪getPrototypeName()
206  );
207 
208  $propertyPath = $this->‪getBasePropertyPathFromMultiValueFormElementProperty($dto);
209  return isset(
210  $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['selectOptions'][$propertyPath]
211  );
212  }
213 
224  ‪ValidationDto $dto,
225  bool $translated = true
226  ): array {
228  throw new ‪PropertyException(
229  sprintf(
230  'No selectOptions found for form element type "%s" and property path "%s"',
231  $dto->‪getFormElementType(),
232  $dto->‪getPropertyPath()
233  ),
234  1614264312
235  );
236  }
237 
238  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
239  $dto->‪getPrototypeName()
240  );
241 
242  $property = $translated ? 'selectOptions' : 'untranslatedSelectOptions';
243  $propertyPath = $this->‪getBasePropertyPathFromMultiValueFormElementProperty($dto);
244  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()][$property][$propertyPath];
245  }
246 
258  ‪ValidationDto $dto
259  ): bool {
260  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
261  $dto->‪getPrototypeName()
262  );
263 
265  return isset(
266  $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['selectOptions'][$propertyPath]
267  );
268  }
269 
280  ‪ValidationDto $dto,
281  bool $translated = true
282  ): array {
284  throw new ‪PropertyException(
285  sprintf(
286  'No selectOptions found for property collection "%s" and identifier "%s" and property path "%s"',
289  $dto->‪getPropertyPath()
290  ),
291  1614264313
292  );
293  }
294 
295  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
296  $dto->‪getPrototypeName()
297  );
298 
299  $property = $translated ? 'selectOptions' : 'untranslatedSelectOptions';
301  return $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()][$property][$propertyPath];
302  }
303 
309  ‪ValidationDto $dto
310  ): string {
311  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
312  $dto->‪getPrototypeName()
313  );
314 
315  $propertyPath = $dto->‪getPropertyPath();
316  $multiValueProperties = $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['multiValueProperties'] ?? [];
317  foreach ($multiValueProperties as $multiValueProperty) {
318  if (strpos($propertyPath, $multiValueProperty) === 0) {
319  $propertyPath = $multiValueProperty;
320  continue;
321  }
322  }
323 
324  return $propertyPath;
325  }
326 
332  ‪ValidationDto $dto
333  ): string {
334  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
335  $dto->‪getPrototypeName()
336  );
337 
338  $propertyPath = $dto->‪getPropertyPath();
339  $multiValueProperties = $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['multiValueProperties'] ?? [];
340  foreach ($multiValueProperties as $multiValueProperty) {
341  if (strpos($propertyPath, $multiValueProperty) === 0) {
342  $propertyPath = $multiValueProperty;
343  continue;
344  }
345  }
346 
347  return $propertyPath;
348  }
349 
362  ‪ValidationDto $dto
363  ): bool {
364  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
365  $dto->‪getPrototypeName()
366  );
367  return isset(
368  $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['predefinedDefaults'][$dto->‪getPropertyPath()]
369  );
370  }
371 
383  public function ‪getFormElementPredefinedDefaultValueFromFormEditorSetup(‪ValidationDto $dto, bool $translated = true)
384  {
386  throw new ‪PropertyException(
387  sprintf(
388  'No predefinedDefaults found for form element type "%s" and property path "%s"',
389  $dto->‪getFormElementType(),
390  $dto->‪getPropertyPath()
391  ),
392  1528578401
393  );
394  }
395 
396  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
397  $dto->‪getPrototypeName()
398  );
399 
400  $property = $translated ? 'predefinedDefaults' : 'untranslatedPredefinedDefaults';
401  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()][$property][$dto->‪getPropertyPath()];
402  }
403 
416  ‪ValidationDto $dto
417  ): bool {
418  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
419  $dto->‪getPrototypeName()
420  );
421  return isset(
422  $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['predefinedDefaults'][$dto->‪getPropertyPath()]
423  );
424  }
425 
437  public function ‪getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup(‪ValidationDto $dto, bool $translated = true)
438  {
440  throw new ‪PropertyException(
441  sprintf(
442  'No predefinedDefaults found for property collection "%s" and identifier "%s" and property path "%s"',
445  $dto->‪getPropertyPath()
446  ),
447  1528578402
448  );
449  }
450 
451  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
452  $dto->‪getPrototypeName()
453  );
454 
455  $property = $translated ? 'predefinedDefaults' : 'untranslatedPredefinedDefaults';
456  return $formDefinitionValidationConfiguration['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()][$property][$dto->‪getPropertyPath()];
457  }
458 
472  {
473  if ($dto->‪getFormElementType() === 'Form') {
474  return true;
475  }
476  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
477  $dto->‪getPrototypeName()
478  );
479  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['creatable'] ?? false;
480  }
481 
496  {
497  $formDefinitionValidationConfiguration = $this->‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(
498  $dto->‪getPrototypeName()
499  );
500  return $formDefinitionValidationConfiguration['formElements'][$dto->‪getFormElementType()]['collections'][$dto->‪getPropertyCollectionName()][$dto->‪getPropertyCollectionElementIdentifier()]['creatable'] ?? false;
501  }
502 
510  public function ‪isFormElementTypeDefinedInFormSetup(‪ValidationDto $dto): bool
511  {
512  $prototypeConfiguration = $this->‪getPrototypeConfiguration($dto->‪getPrototypeName());
514  $prototypeConfiguration,
515  'formElementsDefinition.' . $dto->‪getFormElementType(),
516  '.'
517  );
518  }
519 
526  public function ‪getAllBackendTranslationsForTranslationKeys(array $keys, string $prototypeName): array
527  {
528  $translations = [];
529  foreach ($keys as $key) {
530  if (!is_string($key)) {
531  continue;
532  }
533 
534  $translations[$key] = $this->‪getAllBackendTranslationsForTranslationKey($key, $prototypeName);
535  }
536 
537  return $translations;
538  }
539 
545  public function ‪getAllBackendTranslationsForTranslationKey(string $key, string $prototypeName): array
546  {
547  $prototypeConfiguration = $this->‪getPrototypeConfiguration($prototypeName);
548 
549  $translationFiles = $prototypeConfiguration['formEditor']['translationFile'] ?? [];
550  if (is_string($translationFiles)) {
551  $translationFiles = [$translationFiles];
552  }
553 
555  $key,
556  [],
557  $translationFiles
558  );
559  }
560 
568  protected function ‪buildFormDefinitionValidationConfigurationFromFormEditorSetup(string $prototypeName): array
569  {
570  $cacheKey = implode('_', ['buildFormDefinitionValidationConfigurationFromFormEditorSetup', $prototypeName]);
571  $configuration = $this->‪getCacheEntry($cacheKey);
572 
573  if ($configuration === null) {
574  $prototypeConfiguration = $this->‪getPrototypeConfiguration($prototypeName);
575  $extractorDto = GeneralUtility::makeInstance(ExtractorDto::class, $prototypeConfiguration);
576 
577  GeneralUtility::makeInstance(ArrayProcessor::class, $prototypeConfiguration)->forEach(
578  GeneralUtility::makeInstance(
579  ArrayProcessing::class,
580  'formElementPropertyPaths',
581  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.(propertyPath|.*\.propertyPath)$',
582  GeneralUtility::makeInstance(PropertyPathsExtractor::class, $extractorDto)
583  ),
584  GeneralUtility::makeInstance(
585  ArrayProcessing::class,
586  'formElementAdditionalElementPropertyPaths',
587  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.additionalElementPropertyPaths\.([\d]+)',
588  GeneralUtility::makeInstance(AdditionalElementPropertyPathsExtractor::class, $extractorDto)
589  ),
590  GeneralUtility::makeInstance(
591  ArrayProcessing::class,
592  'formElementRelativeMultiValueProperties',
593  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.templateName$',
594  GeneralUtility::makeInstance(MultiValuePropertiesExtractor::class, $extractorDto)
595  ),
596  GeneralUtility::makeInstance(
597  ArrayProcessing::class,
598  'formElementSelectOptions',
599  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.selectOptions\.([\d]+)\.value$',
600  GeneralUtility::makeInstance(SelectOptionsExtractor::class, $extractorDto)
601  ),
602  GeneralUtility::makeInstance(
603  ArrayProcessing::class,
604  'formElementPredefinedDefaults',
605  '^formElementsDefinition\.(.*)\.formEditor\.predefinedDefaults\.(.+)$',
606  GeneralUtility::makeInstance(PredefinedDefaultsExtractor::class, $extractorDto)
607  ),
608  GeneralUtility::makeInstance(
609  ArrayProcessing::class,
610  'formElementCreatable',
611  '^formElementsDefinition\.(.*)\.formEditor.group$',
612  GeneralUtility::makeInstance(IsCreatableFormElementExtractor::class, $extractorDto)
613  ),
614  GeneralUtility::makeInstance(
615  ArrayProcessing::class,
616  'propertyCollectionCreatable',
617  '^formElementsDefinition\.(.*)\.formEditor\.editors\.([\d]+)\.templateName$',
618  GeneralUtility::makeInstance(IsCreatablePropertyCollectionElementExtractor::class, $extractorDto)
619  ),
620  GeneralUtility::makeInstance(
621  ArrayProcessing::class,
622  'propertyCollectionPropertyPaths',
623  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.(propertyPath|.*\.propertyPath)$',
624  GeneralUtility::makeInstance(CollectionPropertyPathsExtractor::class, $extractorDto)
625  ),
626  GeneralUtility::makeInstance(
627  ArrayProcessing::class,
628  'propertyCollectionAdditionalElementPropertyPaths',
629  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.additionalElementPropertyPaths\.([\d]+)',
630  GeneralUtility::makeInstance(AdditionalElementPropertyPathsExtractor::class, $extractorDto)
631  ),
632  GeneralUtility::makeInstance(
633  ArrayProcessing::class,
634  'propertyCollectionRelativeMultiValueProperties',
635  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.templateName$',
636  GeneralUtility::makeInstance(CollectionMultiValuePropertiesExtractor::class, $extractorDto)
637  ),
638  GeneralUtility::makeInstance(
639  ArrayProcessing::class,
640  'propertyCollectionSelectOptions',
641  '^formElementsDefinition\.(.*)\.formEditor\.propertyCollections\.(finishers|validators)\.([\d]+)\.editors\.([\d]+)\.selectOptions\.([\d]+)\.value$',
642  GeneralUtility::makeInstance(CollectionSelectOptionsExtractor::class, $extractorDto)
643  ),
644  GeneralUtility::makeInstance(
645  ArrayProcessing::class,
646  'propertyCollectionPredefinedDefaults',
647  '^(validatorsDefinition|finishersDefinition)\.(.*)\.formEditor\.predefinedDefaults\.(.+)$',
648  GeneralUtility::makeInstance(CollectionPredefinedDefaultsExtractor::class, $extractorDto)
649  )
650  );
651  $configuration = $extractorDto->getResult();
652 
653  $configuration = $this->‪translateValues($prototypeConfiguration, $configuration);
654 
656  $prototypeName,
657  $configuration
658  );
659 
660  $this->‪setCacheEntry($cacheKey, $configuration);
661  }
662 
663  return $configuration;
664  }
665 
697  string $prototypeName,
698  array $configuration
699  ): array {
700  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/form']['buildFormDefinitionValidationConfiguration'] ?? [] as $className) {
701  $hookObj = GeneralUtility::makeInstance($className);
702  if (method_exists($hookObj, 'addAdditionalPropertyPaths')) {
703  $validationDto = GeneralUtility::makeInstance(ValidationDto::class, $prototypeName);
704  $propertyPathsFromHook = $hookObj->addAdditionalPropertyPaths($validationDto);
705  if (!is_array($propertyPathsFromHook)) {
706  $message = 'Return value of "%s->addAdditionalPropertyPaths() must be type "array"';
707  throw new ‪PropertyException(sprintf($message, $className), 1528633965);
708  }
709  $configuration = $this->‪addAdditionalPropertyPathsFromHook(
710  $className,
711  $prototypeName,
712  $propertyPathsFromHook,
713  $configuration
714  );
715  }
716  }
717 
718  return $configuration;
719  }
720 
729  protected function ‪addAdditionalPropertyPathsFromHook(
730  string $hookClassName,
731  string $prototypeName,
732  array $propertyPathsFromHook,
733  array $configuration
734  ): array {
735  foreach ($propertyPathsFromHook as $index => $validationDto) {
736  if (!($validationDto instanceof ‪ValidationDto)) {
737  $message = 'Return value of "%s->addAdditionalPropertyPaths()[%s] must be an instance of "%s"';
738  throw new ‪PropertyException(
739  sprintf($message, $hookClassName, $index, ValidationDto::class),
740  1528633966
741  );
742  }
743 
744  if ($validationDto->getPrototypeName() !== $prototypeName) {
745  $message = 'The prototype name "%s" does not match "%s" on "%s->addAdditionalPropertyPaths()[%s]';
746  throw new ‪PropertyException(
747  sprintf(
748  $message,
749  $validationDto->getPrototypeName(),
750  $prototypeName,
751  $hookClassName,
752  $index,
753  ValidationDto::class
754  ),
755  1528634966
756  );
757  }
758 
759  $formElementType = $validationDto->getFormElementType();
760  if (!$this->‪isFormElementTypeDefinedInFormSetup($validationDto)) {
761  $message = 'Form element type "%s" does not exists in prototype configuration "%s"';
762  throw new ‪PropertyException(
763  sprintf($message, $formElementType, $validationDto->getPrototypeName()),
764  1528633967
765  );
766  }
767 
768  if ($validationDto->hasPropertyCollectionName() &&
769  $validationDto->hasPropertyCollectionElementIdentifier()) {
770  $propertyCollectionName = $validationDto->getPropertyCollectionName();
771  $propertyCollectionElementIdentifier = $validationDto->getPropertyCollectionElementIdentifier();
772 
773  if ($propertyCollectionName !== 'finishers' && $propertyCollectionName !== 'validators') {
774  $message = 'The property collection name "%s" for form element "%s" must be "finishers" or "validators"';
775  throw new ‪PropertyException(
776  sprintf($message, $propertyCollectionName, $formElementType),
777  1528636941
778  );
779  }
780 
781  $configuration['formElements'][$formElementType]['collections'][$propertyCollectionName][$propertyCollectionElementIdentifier]['additionalPropertyPaths'][]
782  = $validationDto->getPropertyPath();
783  } else {
784  $configuration['formElements'][$formElementType]['additionalPropertyPaths'][]
785  = $validationDto->getPropertyPath();
786  }
787  }
788 
789  return $configuration;
790  }
791 
797  protected function ‪isPropertyDefinedInFormEditorSetup(string $propertyPath, array $subConfig): bool
798  {
799  if (empty($subConfig)) {
800  return false;
801  }
802  if (
803  in_array($propertyPath, $subConfig['propertyPaths'] ?? [], true)
804  || in_array($propertyPath, $subConfig['additionalElementPropertyPaths'] ?? [], true)
805  || in_array($propertyPath, $subConfig['additionalPropertyPaths'] ?? [], true)
806  ) {
807  return true;
808  }
809  foreach ($subConfig['multiValueProperties'] ?? [] as $relativeMultiValueProperty) {
810  if (strpos($propertyPath, $relativeMultiValueProperty) === 0) {
811  return true;
812  }
813  }
814 
815  return false;
816  }
817 
823  protected function ‪translateValues(array $prototypeConfiguration, array $configuration): array
824  {
825  if (isset($configuration['formElements'])) {
826  $configuration['formElements'] = $this->‪translatePredefinedDefaults(
827  $prototypeConfiguration,
828  $configuration['formElements']
829  );
830 
831  $configuration['formElements'] = $this->‪translateSelectOptions(
832  $prototypeConfiguration,
833  $configuration['formElements']
834  );
835  }
836 
837  foreach ($configuration['collections'] ?? [] as $name => $collections) {
838  $configuration['collections'][$name] = $this->‪translatePredefinedDefaults($prototypeConfiguration, $collections);
839  $configuration['collections'][$name] = $this->‪translateSelectOptions($prototypeConfiguration, $configuration['collections'][$name]);
840  }
841  return $configuration;
842  }
843 
849  protected function ‪translatePredefinedDefaults(array $prototypeConfiguration, array $formElements): array
850  {
851  foreach ($formElements ?? [] as $name => $formElement) {
852  if (!isset($formElement['predefinedDefaults'])) {
853  continue;
854  }
855  $formElement['untranslatedPredefinedDefaults'] = $formElement['predefinedDefaults'];
856  $formElement['predefinedDefaults'] = $this->‪getTranslationService()->‪translateValuesRecursive(
857  $formElement['predefinedDefaults'],
858  $prototypeConfiguration['formEditor']['translationFile'] ?? null
859  );
860  $formElements[$name] = $formElement;
861  }
862  return $formElements;
863  }
864 
870  protected function ‪translateSelectOptions(array $prototypeConfiguration, array $formElements): array
871  {
872  foreach ($formElements ?? [] as $name => $formElement) {
873  if (empty($formElement['selectOptions']) || !is_array($formElement['selectOptions'])) {
874  continue;
875  }
876  $formElement['untranslatedSelectOptions'] = $formElement['selectOptions'];
877 
878  $formElement['selectOptions'] = $this->‪getTranslationService()->‪translateValuesRecursive(
879  $formElement['selectOptions'],
880  $prototypeConfiguration['formEditor']['translationFiles'] ?? []
881  );
882  $formElements[$name] = $formElement;
883  }
884  return $formElements;
885  }
886 
891  protected function ‪getCacheEntry(string $cacheKey)
892  {
893  if (isset($this->firstLevelCache[$cacheKey])) {
894  return $this->firstLevelCache[$cacheKey];
895  }
896  return $this->‪getCacheFrontend()->‪has('form_' . $cacheKey)
897  ? $this->‪getCacheFrontend()->‪get('form_' . $cacheKey)
898  : null;
899  }
900 
905  protected function ‪setCacheEntry(string $cacheKey, $value): void
906  {
907  $this->‪getCacheFrontend()->‪set('form_' . $cacheKey, $value);
908  $this->firstLevelCache[$cacheKey] = $value;
909  }
910 
914  protected function ‪getTranslationService(): ‪TranslationService
915  {
916  return $this->translationService instanceof ‪TranslationService
917  ? $this->translationService
919  }
920 
924  protected function ‪getCacheFrontend(): ‪FrontendInterface
925  {
926  return GeneralUtility::makeInstance(CacheManager::class)->getCache('assets');
927  }
928 }
‪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:82
‪TYPO3\CMS\Extbase\Property\Exception
Definition: DuplicateObjectException.php:2
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getBasePropertyPathFromMultiValueFormElementProperty
‪string getBasePropertyPathFromMultiValueFormElementProperty(ValidationDto $dto)
Definition: ConfigurationService.php:305
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup
‪bool isPropertyCollectionPropertyDefinedInPredefinedDefaultsInFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:412
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\PredefinedDefaultsExtractor
Definition: PredefinedDefaultsExtractor.php:24
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\PropertyCollectionElement\MultiValuePropertiesExtractor
Definition: MultiValuePropertiesExtractor.php:25
‪TYPO3\CMS\Form\Domain\Configuration
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\formElementPropertyHasLimitedAllowedValuesDefinedWithinFormEditorSetup
‪bool formElementPropertyHasLimitedAllowedValuesDefinedWithinFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:198
‪TYPO3\CMS\Form\Service\TranslationService
Definition: TranslationService.php:43
‪TYPO3\CMS\Form\Domain\Configuration\Exception\PrototypeNotFoundException
Definition: PrototypeNotFoundException.php:24
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\translatePredefinedDefaults
‪array translatePredefinedDefaults(array $prototypeConfiguration, array $formElements)
Definition: ConfigurationService.php:846
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\MultiValuePropertiesExtractor
Definition: MultiValuePropertiesExtractor.php:25
‪TYPO3\CMS\Form\Service\TranslationService\translateValuesRecursive
‪array translateValuesRecursive(array $array, $translationFile=null)
Definition: TranslationService.php:178
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getAllowedValuesForPropertyCollectionPropertyFromFormEditorSetup
‪array getAllowedValuesForPropertyCollectionPropertyFromFormEditorSetup(ValidationDto $dto, bool $translated=true)
Definition: ConfigurationService.php:276
‪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:468
‪TYPO3\CMS\Core\Utility\ArrayUtility\isValidPath
‪static bool isValidPath(array $array, $path, $delimiter='/')
Definition: ArrayUtility.php:143
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getAllBackendTranslationsForTranslationKeys
‪array getAllBackendTranslationsForTranslationKeys(array $keys, string $prototypeName)
Definition: ConfigurationService.php:523
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isPropertyCollectionElementIdentifierCreatableByFormEditor
‪bool isPropertyCollectionElementIdentifierCreatableByFormEditor(ValidationDto $dto)
Definition: ConfigurationService.php:492
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getBasePropertyPathFromMultiValuePropertyCollectionElement
‪string getBasePropertyPathFromMultiValuePropertyCollectionElement(ValidationDto $dto)
Definition: ConfigurationService.php:328
‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface\has
‪bool has($entryIdentifier)
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getFormElementPredefinedDefaultValueFromFormEditorSetup
‪mixed getFormElementPredefinedDefaultValueFromFormEditorSetup(ValidationDto $dto, bool $translated=true)
Definition: ConfigurationService.php:380
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\ExtractorDto
Definition: ExtractorDto.php:22
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup
‪bool isFormElementPropertyDefinedInPredefinedDefaultsInFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:358
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getCacheFrontend
‪FrontendInterface getCacheFrontend()
Definition: ConfigurationService.php:921
‪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:693
‪TYPO3\CMS\Form\Domain\Configuration\ArrayProcessing\ArrayProcessing
Definition: ArrayProcessing.php:25
‪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\initializeObject
‪initializeObject()
Definition: ConfigurationService.php:66
‪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:794
‪TYPO3\CMS\Form\Domain\Configuration\ArrayProcessing\ArrayProcessor
Definition: ArrayProcessor.php:28
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isFormElementTypeDefinedInFormSetup
‪bool isFormElementTypeDefinedInFormSetup(ValidationDto $dto)
Definition: ConfigurationService.php:507
‪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:116
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\PropertyCollectionElement\PropertyPathsExtractor
Definition: PropertyPathsExtractor.php:25
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getAllowedValuesForFormElementPropertyFromFormEditorSetup
‪array getAllowedValuesForFormElementPropertyFromFormEditorSetup(ValidationDto $dto, bool $translated=true)
Definition: ConfigurationService.php:220
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isPropertyCollectionPropertyDefinedInFormEditorSetup
‪bool isPropertyCollectionPropertyDefinedInFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:178
‪TYPO3\CMS\Core\Cache\CacheManager
Definition: CacheManager.php:34
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getSelectablePrototypeNamesDefinedInFormEditorSetup
‪array getSelectablePrototypeNamesDefinedInFormEditorSetup()
Definition: ConfigurationService.php:97
‪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:24
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getTranslationService
‪TranslationService getTranslationService()
Definition: ConfigurationService.php:911
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService
Definition: ConfigurationService.php:49
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\buildFormDefinitionValidationConfigurationFromFormEditorSetup
‪array buildFormDefinitionValidationConfigurationFromFormEditorSetup(string $prototypeName)
Definition: ConfigurationService.php:565
‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
Definition: FrontendInterface.php:21
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\isFormElementPropertyDefinedInFormEditorSetup
‪bool isFormElementPropertyDefinedInFormEditorSetup(ValidationDto $dto)
Definition: ConfigurationService.php:143
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\SelectOptionsExtractor
Definition: SelectOptionsExtractor.php:25
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\IsCreatableFormElementExtractor
Definition: IsCreatableFormElementExtractor.php:25
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\translateSelectOptions
‪array translateSelectOptions(array $prototypeConfiguration, array $formElements)
Definition: ConfigurationService.php:867
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\PropertyCollectionElement\SelectOptionsExtractor
Definition: SelectOptionsExtractor.php:25
‪TYPO3\CMS\Core\Utility\ArrayUtility
Definition: ArrayUtility.php:23
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getCacheEntry
‪mixed getCacheEntry(string $cacheKey)
Definition: ConfigurationService.php:888
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:22
‪$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:80
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\AdditionalElementPropertyPathsExtractor
Definition: AdditionalElementPropertyPathsExtractor.php:22
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup
‪mixed getPropertyCollectionPredefinedDefaultValueFromFormEditorSetup(ValidationDto $dto, bool $translated=true)
Definition: ConfigurationService.php:434
‪TYPO3\CMS\Form\Mvc\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_YAML_SETTINGS
‪const CONFIGURATION_TYPE_YAML_SETTINGS
Definition: ConfigurationManagerInterface.php:28
‪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:215
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪TYPO3\CMS\Form\Domain\Configuration\Exception\PropertyException
Definition: PropertyException.php:24
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\translateValues
‪array translateValues(array $prototypeConfiguration, array $configuration)
Definition: ConfigurationService.php:820
‪TYPO3\CMS\Extbase\Object\ObjectManager
Definition: ObjectManager.php:25
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\FormElement\PropertyPathsExtractor
Definition: PropertyPathsExtractor.php:25
‪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:254
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\getAllBackendTranslationsForTranslationKey
‪array getAllBackendTranslationsForTranslationKey(string $key, string $prototypeName)
Definition: ConfigurationService.php:542
‪TYPO3\CMS\Form\Domain\Configuration\FrameworkConfiguration\Extractors\PropertyCollectionElement\IsCreatablePropertyCollectionElementExtractor
Definition: IsCreatablePropertyCollectionElementExtractor.php:25
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\addAdditionalPropertyPathsFromHook
‪array addAdditionalPropertyPathsFromHook(string $hookClassName, string $prototypeName, array $propertyPathsFromHook, array $configuration)
Definition: ConfigurationService.php:726
‪TYPO3\CMS\Form\Mvc\Configuration\ConfigurationManagerInterface
Definition: ConfigurationManagerInterface.php:27
‪TYPO3\CMS\Form\Domain\Configuration\ConfigurationService\setCacheEntry
‪setCacheEntry(string $cacheKey, $value)
Definition: ConfigurationService.php:902