DataMapFactory implements SingletonInterface
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.
Table of Contents
Interfaces
- SingletonInterface
- "empty" interface for singletons (marker interface pattern)
Properties
- $baseCacheIdentifier : string
- $cacheManager : CacheManager
- $configurationManager : ConfigurationManagerInterface
- $dataMapCache : FrontendInterface
- $dataMaps : array<string|int, mixed>
- Runtime cache for data maps, to reduce number of calls to cache backend.
- $reflectionService : ReflectionService
Methods
- __construct() : mixed
- buildDataMap() : DataMap
- Builds a data map by adding column maps for all the configured columns in the $TCA.
- setOneToManyRelation() : ColumnMap
- This method sets the configuration for a 1:n relation based on the $TCA column configuration
- addMetaDataColumnNames() : DataMap
- buildDataMapInternal() : DataMap
- Builds a data map by adding column maps for all the configured columns in the $TCA.
- createColumnMap() : ColumnMap
- Creates the ColumnMap object for the given columnName and propertyName
- getColumnsDefinition() : array<string|int, mixed>
- Returns the TCA columns array of the specified table
- getControlSection() : array<string|int, mixed>|null
- Returns the TCA ctrl section of the specified table; or NULL if not set
- resolveTableName() : string
- Resolve the table name for the given class name
- setFieldEvaluations() : ColumnMap
- Sets field evaluations based on $TCA column configuration.
- setManyToManyRelation() : ColumnMap
- This method sets the configuration for a m:n relation based on the $TCA column configuration
- setOneToOneRelation() : ColumnMap
- This method sets the configuration for a 1:1 relation based on the $TCA column configuration
- setRelations() : ColumnMap
- This method tries to determine the type of type of relation to other tables and sets it based on the $TCA column configuration
- setType() : ColumnMap
- Set the table column type
Properties
$baseCacheIdentifier
protected
string
$baseCacheIdentifier
$cacheManager
protected
CacheManager
$cacheManager
$configurationManager
protected
ConfigurationManagerInterface
$configurationManager
$dataMapCache
protected
FrontendInterface
$dataMapCache
$dataMaps
Runtime cache for data maps, to reduce number of calls to cache backend.
protected
array<string|int, mixed>
$dataMaps
= []
$reflectionService
protected
ReflectionService
$reflectionService
Methods
__construct()
public
__construct(ReflectionService $reflectionService, ConfigurationManagerInterface $configurationManager, CacheManager $cacheManager, ClassesConfiguration $classesConfiguration, string $baseCacheIdentifier) : mixed
Parameters
- $reflectionService : ReflectionService
- $configurationManager : ConfigurationManagerInterface
- $cacheManager : CacheManager
- $classesConfiguration : ClassesConfiguration
- $baseCacheIdentifier : string
buildDataMap()
Builds a data map by adding column maps for all the configured columns in the $TCA.
public
buildDataMap(string $className) : DataMap
It also resolves the type of values the column is holding and the typo of relation the column represents.
Parameters
- $className : string
-
The class name you want to fetch the Data Map for
Return values
DataMap —The data map
setOneToManyRelation()
This method sets the configuration for a 1:n relation based on the $TCA column configuration
public
setOneToManyRelation(ColumnMap $columnMap[, array<string|int, mixed>|null $columnConfiguration = null ]) : ColumnMap
Parameters
- $columnMap : ColumnMap
-
The column map
- $columnConfiguration : array<string|int, mixed>|null = null
-
The column configuration from $TCA
Return values
ColumnMapaddMetaDataColumnNames()
protected
addMetaDataColumnNames(DataMap $dataMap, string $tableName) : DataMap
Parameters
- $dataMap : DataMap
- $tableName : string
Return values
DataMapbuildDataMapInternal()
Builds a data map by adding column maps for all the configured columns in the $TCA.
protected
buildDataMapInternal(string $className) : DataMap
It also resolves the type of values the column is holding and the typo of relation the column represents.
Parameters
- $className : string
-
The class name you want to fetch the Data Map for
Tags
Return values
DataMap —The data map
createColumnMap()
Creates the ColumnMap object for the given columnName and propertyName
protected
createColumnMap(string $columnName, string $propertyName) : ColumnMap
Parameters
- $columnName : string
- $propertyName : string
Return values
ColumnMapgetColumnsDefinition()
Returns the TCA columns array of the specified table
protected
getColumnsDefinition(string $tableName) : array<string|int, mixed>
Parameters
- $tableName : string
-
An optional table name to fetch the columns definition from
Return values
array<string|int, mixed> —The TCA columns definition
getControlSection()
Returns the TCA ctrl section of the specified table; or NULL if not set
protected
getControlSection(string $tableName) : array<string|int, mixed>|null
Parameters
- $tableName : string
-
An optional table name to fetch the columns definition from
Return values
array<string|int, mixed>|null —The TCA columns definition
resolveTableName()
Resolve the table name for the given class name
protected
resolveTableName(string $className) : string
Parameters
- $className : string
Return values
string —The table name
setFieldEvaluations()
Sets field evaluations based on $TCA column configuration.
protected
setFieldEvaluations(ColumnMap $columnMap[, array<string|int, mixed>|null $columnConfiguration = null ]) : ColumnMap
Parameters
- $columnMap : ColumnMap
-
The column map
- $columnConfiguration : array<string|int, mixed>|null = null
-
The column configuration from $TCA
Return values
ColumnMapsetManyToManyRelation()
This method sets the configuration for a m:n relation based on the $TCA column configuration
protected
setManyToManyRelation(ColumnMap $columnMap[, array<string|int, mixed>|null $columnConfiguration = null ]) : ColumnMap
Parameters
- $columnMap : ColumnMap
-
The column map
- $columnConfiguration : array<string|int, mixed>|null = null
-
The column configuration from $TCA
Tags
Return values
ColumnMapsetOneToOneRelation()
This method sets the configuration for a 1:1 relation based on the $TCA column configuration
protected
setOneToOneRelation(ColumnMap $columnMap[, array<string|int, mixed>|null $columnConfiguration = null ]) : ColumnMap
Parameters
- $columnMap : ColumnMap
-
The column map
- $columnConfiguration : array<string|int, mixed>|null = null
-
The column configuration from $TCA
Return values
ColumnMapsetRelations()
This method tries to determine the type of type of relation to other tables and sets it based on the $TCA column configuration
protected
setRelations(ColumnMap $columnMap, array<string|int, mixed>|null $columnConfiguration, string|null $type, string|null $elementType) : ColumnMap
Parameters
- $columnMap : ColumnMap
-
The column map
- $columnConfiguration : array<string|int, mixed>|null
-
The column configuration from $TCA
- $type : string|null
- $elementType : string|null
Return values
ColumnMapsetType()
Set the table column type
protected
setType(ColumnMap $columnMap, array<string|int, mixed> $columnConfiguration) : ColumnMap
Parameters
- $columnMap : ColumnMap
- $columnConfiguration : array<string|int, mixed>