‪TYPO3CMS  ‪main
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, ColumnMapFactory $columnMapFactory, string $baseCacheIdentifier)
 
TYPO3 CMS Extbase Persistence Generic Mapper DataMap buildDataMap (string $className)
 

Protected Member Functions

TYPO3 CMS Extbase Persistence Generic Mapper DataMap buildDataMapInternal (string $className)
 
string resolveTableName (string $className)
 
array getColumnsDefinition (string $tableName)
 
 addMetaDataColumnNames (DataMap $dataMap, string $tableName)
 

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
 
ColumnMapFactory $columnMapFactory
 

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 33 of file DataMapFactory.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ addMetaDataColumnNames()

◆ 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 90 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

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
Exceptions

Definition at line 116 of file DataMapFactory.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory\addMetaDataColumnNames(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory\getColumnsDefinition(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory\resolveTableName(), and TYPO3\CMS\Core\Utility\GeneralUtility\underscoredToLowerCamelCase().

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

◆ 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 186 of file DataMapFactory.php.

References $GLOBALS.

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

◆ resolveTableName()

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

Resolve the table name for the given class name

Returns
‪string The table name

Definition at line 165 of file DataMapFactory.php.

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

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

◆ $columnMapFactory

ColumnMapFactory TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapFactory::$columnMapFactory
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 49 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 55 of file DataMapFactory.php.

◆ $reflectionService

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