‪TYPO3CMS  9.5
AbstractTypeConverter.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
26 {
32  protected ‪$sourceTypes = [];
33 
39  protected ‪$targetType = '';
40 
46  protected ‪$priority;
47 
51  protected ‪$objectManager;
52 
57  public function ‪injectObjectManager(\‪TYPO3\CMS\‪Extbase\Object\ObjectManagerInterface ‪$objectManager)
58  {
59  $this->objectManager = ‪$objectManager;
60  }
61 
68  public function ‪getSupportedSourceTypes()
69  {
70  return ‪$this->sourceTypes;
71  }
72 
79  public function ‪getSupportedTargetType()
80  {
81  return ‪$this->targetType;
82  }
83 
92  public function ‪getTargetTypeForSource($source, $originalTargetType, \‪TYPO3\CMS\‪Extbase\Property\PropertyMappingConfigurationInterface $configuration = null)
93  {
94  return $originalTargetType;
95  }
96 
102  public function ‪getPriority()
103  {
104  return ‪$this->priority;
105  }
106 
114  public function ‪canConvertFrom($source, ‪$targetType)
115  {
116  return true;
117  }
118 
125  public function ‪getSourceChildPropertiesToBeConverted($source)
126  {
127  return [];
128  }
129 
137  public function ‪getTypeOfChildProperty(‪$targetType, $propertyName, \‪TYPO3\CMS\‪Extbase\Property\PropertyMappingConfigurationInterface $configuration)
138  {
139  }
140 }
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:4
‪TYPO3\CMS\Extbase\Property\TypeConverterInterface
Definition: TypeConverterInterface.php:23
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getSupportedSourceTypes
‪array< string > getSupportedSourceTypes()
Definition: AbstractTypeConverter.php:64
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getSourceChildPropertiesToBeConverted
‪array getSourceChildPropertiesToBeConverted($source)
Definition: AbstractTypeConverter.php:121
‪TYPO3
‪TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface
Definition: PropertyMappingConfigurationInterface.php:21
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getTypeOfChildProperty
‪getTypeOfChildProperty($targetType, $propertyName, \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface $configuration)
Definition: AbstractTypeConverter.php:133
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\canConvertFrom
‪bool canConvertFrom($source, $targetType)
Definition: AbstractTypeConverter.php:110
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\$priority
‪int $priority
Definition: AbstractTypeConverter.php:43
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\$targetType
‪string $targetType
Definition: AbstractTypeConverter.php:37
‪TYPO3\CMS\Extbase\Property\TypeConverter
Definition: AbstractFileCollectionConverter.php:2
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getPriority
‪int getPriority()
Definition: AbstractTypeConverter.php:98
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\$objectManager
‪TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
Definition: AbstractTypeConverter.php:47
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter
Definition: AbstractTypeConverter.php:26
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\injectObjectManager
‪injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
Definition: AbstractTypeConverter.php:53
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\$sourceTypes
‪array< string > $sourceTypes
Definition: AbstractTypeConverter.php:31
‪TYPO3\CMS\Core\SingletonInterface
Definition: SingletonInterface.php:22
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getTargetTypeForSource
‪string getTargetTypeForSource($source, $originalTargetType, \TYPO3\CMS\Extbase\Property\PropertyMappingConfigurationInterface $configuration=null)
Definition: AbstractTypeConverter.php:88
‪TYPO3\CMS\Extbase\Property\TypeConverter\AbstractTypeConverter\getSupportedTargetType
‪string getSupportedTargetType()
Definition: AbstractTypeConverter.php:75