‪TYPO3CMS  10.4
AbstractTypeConverter.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 
24 
34 {
40  protected ‪$sourceTypes = [];
41 
47  protected ‪$targetType = '';
48 
54  protected ‪$priority;
55 
59  protected ‪$objectManager;
60 
66  {
67  $this->objectManager = ‪$objectManager;
68  }
69 
76  public function ‪getSupportedSourceTypes(): array
77  {
78  return ‪$this->sourceTypes;
79  }
80 
87  public function ‪getSupportedTargetType(): string
88  {
89  return ‪$this->targetType;
90  }
91 
100  public function ‪getTargetTypeForSource($source, string $originalTargetType, PropertyMappingConfigurationInterface $configuration = null): string
101  {
102  return $originalTargetType;
103  }
104 
110  public function ‪getPriority(): int
111  {
112  return ‪$this->priority;
113  }
114 
124  public function ‪canConvertFrom($source, string ‪$targetType): bool
125  {
126  return true;
127  }
128 
137  public function ‪getSourceChildPropertiesToBeConverted($source): array
138  {
139  return [];
140  }
141 
152  public function ‪getTypeOfChildProperty(string ‪$targetType, string $propertyName, PropertyMappingConfigurationInterface $configuration): string
153  {
154  return '';
155  }
156 }
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getTargetTypeForSource
‪string getTargetTypeForSource($source, string $originalTargetType, PropertyMappingConfigurationInterface $configuration=null)
Definition: AbstractTypeConverter.php:96
‪TYPO3\CMS\Extbase\Property\TypeConverterInterface
Definition: TypeConverterInterface.php:26
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getSourceChildPropertiesToBeConverted
‪array getSourceChildPropertiesToBeConverted($source)
Definition: AbstractTypeConverter.php:133
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\$sourceTypes
‪string[] $sourceTypes
Definition: AbstractTypeConverter.php:39
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\canConvertFrom
‪bool canConvertFrom($source, string $targetType)
Definition: AbstractTypeConverter.php:120
‪TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface
Definition: PropertyMappingConfigurationInterface.php:22
‪TYPO3\CMS\Extbase\Object\ObjectManagerInterface
Definition: ObjectManagerInterface.php:26
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\$priority
‪int $priority
Definition: AbstractTypeConverter.php:51
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\$targetType
‪string $targetType
Definition: AbstractTypeConverter.php:45
‪TYPO3\CMS\Extbase\Property\TypeConverter
Definition: AbstractFileCollectionConverter.php:18
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getPriority
‪int getPriority()
Definition: AbstractTypeConverter.php:106
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\$objectManager
‪TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
Definition: AbstractTypeConverter.php:55
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\injectObjectManager
‪injectObjectManager(ObjectManagerInterface $objectManager)
Definition: AbstractTypeConverter.php:61
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter
Definition: AbstractTypeConverter.php:34
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:23
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getTypeOfChildProperty
‪string getTypeOfChildProperty(string $targetType, string $propertyName, PropertyMappingConfigurationInterface $configuration)
Definition: AbstractTypeConverter.php:148
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getSupportedSourceTypes
‪string[] getSupportedSourceTypes()
Definition: AbstractTypeConverter.php:72
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getSupportedTargetType
‪string getSupportedTargetType()
Definition: AbstractTypeConverter.php:83