‪TYPO3CMS  11.5
TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 __construct (ReflectionService $reflectionService, ConfigurationManagerInterface $configurationManager, CacheManager $cacheManager, ClassesConfiguration $classesConfiguration, string $baseCacheIdentifier)
 
TYPO3 CMS Extbase Persistence Generic Mapper DataMap buildDataMap (string $className)
 
ColumnMap setOneToManyRelation (ColumnMap $columnMap, array $columnConfiguration=null)
 

Protected Member Functions

TYPO3 CMS Extbase Persistence Generic Mapper DataMap buildDataMapInternal (string $className)
 
string resolveTableName (string $className)
 
array null getControlSection (string $tableName)
 
array getColumnsDefinition (string $tableName)
 
DataMap addMetaDataColumnNames (DataMap $dataMap, string $tableName)
 
ColumnMap setType (ColumnMap $columnMap, array $columnConfiguration)
 
ColumnMap setRelations (ColumnMap $columnMap, ?array $columnConfiguration, ?string $type, ?string $elementType)
 
ColumnMap setFieldEvaluations (ColumnMap $columnMap, array $columnConfiguration=null)
 
ColumnMap setOneToOneRelation (ColumnMap $columnMap, array $columnConfiguration=null)
 
ColumnMap setManyToManyRelation (ColumnMap $columnMap, array $columnConfiguration=null)
 
ColumnMap createColumnMap (string $columnName, string $propertyName)
 

Protected Attributes

TYPO3 CMS Extbase Reflection ReflectionService $reflectionService
 
TYPO3 CMS Extbase Configuration ConfigurationManagerInterface $configurationManager
 
TYPO3 CMS Core Cache CacheManager $cacheManager
 
FrontendInterface $dataMapCache
 
array $dataMaps = array( )
 
string $baseCacheIdentifier
 

Private Attributes

ClassesConfiguration $classesConfiguration
 

Detailed Description

A factory for a data map to map a single table configured in $TCA on a domain object.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 38 of file DataMapFactory.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ addMetaDataColumnNames()

DataMap TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::addMetaDataColumnNames ( DataMap  $dataMap,
string  $tableName 
)
protected

◆ buildDataMap()

TYPO3 CMS Extbase Persistence Generic Mapper DataMap TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::buildDataMap ( string  $className)

Builds a data map by adding column maps for all the configured columns in the $TCA. It also resolves the type of values the column is holding and the typo of relation the column represents.

Parameters
string$className‪The class name you want to fetch the Data Map for
Returns
‪\TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMap The data map

Definition at line 91 of file DataMapFactory.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory\$baseCacheIdentifier, and TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory\buildDataMapInternal().

◆ buildDataMapInternal()

TYPO3 CMS Extbase Persistence Generic Mapper DataMap TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::buildDataMapInternal ( string  $className)
protected

◆ createColumnMap()

ColumnMap TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::createColumnMap ( string  $columnName,
string  $propertyName 
)
protected

Creates the ColumnMap object for the given columnName and propertyName

Parameters
string$columnName
string$propertyName
Returns
ColumnMap

Definition at line 474 of file DataMapFactory.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory\buildDataMapInternal().

◆ getColumnsDefinition()

array TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::getColumnsDefinition ( string  $tableName)
protected

Returns the TCA columns array of the specified table

Parameters
string$tableName‪An optional table name to fetch the columns definition from
Returns
‪array The TCA columns definition

Definition at line 206 of file DataMapFactory.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory\buildDataMapInternal().

◆ getControlSection()

array null TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::getControlSection ( string  $tableName)
protected

Returns the TCA ctrl section of the specified table; or NULL if not set

Parameters
string$tableName‪An optional table name to fetch the columns definition from
Returns
‪array|null The TCA columns definition

Definition at line 193 of file DataMapFactory.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory\setManyToManyRelation().

◆ resolveTableName()

string TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::resolveTableName ( string  $className)
protected

Resolve the table name for the given class name

Parameters
string$className
Returns
‪string The table name

Definition at line 172 of file DataMapFactory.php.

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory\buildDataMapInternal().

◆ setFieldEvaluations()

ColumnMap TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::setFieldEvaluations ( ColumnMap  $columnMap,
array  $columnConfiguration = null 
)
protected

Sets field evaluations based on $TCA column configuration.

Parameters
ColumnMap$columnMap‪The column map
array | null$columnConfiguration‪The column configuration from $TCA
Returns
ColumnMap

Definition at line 341 of file DataMapFactory.php.

References TYPO3\CMS\Core\Database\Query\QueryHelper\getDateTimeTypes(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\setDateTimeStorageFormat(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory\buildDataMapInternal().

◆ setManyToManyRelation()

ColumnMap TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::setManyToManyRelation ( ColumnMap  $columnMap,
array  $columnConfiguration = null 
)
protected

◆ setOneToManyRelation()

◆ setOneToOneRelation()

◆ setRelations()

ColumnMap TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::setRelations ( ColumnMap  $columnMap,
?array  $columnConfiguration,
?string  $type,
?string  $elementType 
)
protected

◆ setType()

ColumnMap TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::setType ( ColumnMap  $columnMap,
array  $columnConfiguration 
)
protected

Member Data Documentation

◆ $baseCacheIdentifier

string TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::$baseCacheIdentifier
protected

◆ $cacheManager

TYPO3 CMS Core Cache CacheManager TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::$cacheManager
protected

◆ $classesConfiguration

ClassesConfiguration TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::$classesConfiguration
private

◆ $configurationManager

TYPO3 CMS Extbase Configuration ConfigurationManagerInterface TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::$configurationManager
protected

◆ $dataMapCache

FrontendInterface TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::$dataMapCache
protected

Definition at line 54 of file DataMapFactory.php.

◆ $dataMaps

array TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::$dataMaps = array( )
protected

Runtime cache for data maps, to reduce number of calls to cache backend.

Definition at line 60 of file DataMapFactory.php.

◆ $reflectionService

TYPO3 CMS Extbase Reflection ReflectionService TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::$reflectionService
protected