‪TYPO3CMS  ‪main
TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMapFactory Class Reference

Public Member Functions

 __construct (private readonly ReflectionService $reflectionService)
 
 create (string $columnName, array $columnDefinition, string $propertyName, string $className)
 
 setOneToManyRelation (ColumnMap $columnMap, array $columnConfiguration=null)
 

Protected Member Functions

 setType (ColumnMap $columnMap, array $columnConfiguration)
 
 setRelations (ColumnMap $columnMap, ?array $columnConfiguration, ?string $type, ?string $elementType)
 
 setDateTimeStorageFormat (ColumnMap $columnMap, array $columnConfiguration=null)
 
 setOneToOneRelation (ColumnMap $columnMap, array $columnConfiguration=null)
 
 setManyToManyRelation (ColumnMap $columnMap, array $columnConfiguration=null)
 

Detailed Description

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

Definition at line 32 of file ColumnMapFactory.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMapFactory::__construct ( private readonly ReflectionService  $reflectionService)

Definition at line 34 of file ColumnMapFactory.php.

Member Function Documentation

◆ create()

◆ setDateTimeStorageFormat()

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

Sets datetime storage format based on $TCA column configuration.

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

Definition at line 135 of file ColumnMapFactory.php.

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

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMapFactory\create().

◆ setManyToManyRelation()

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

◆ setOneToManyRelation()

◆ setOneToOneRelation()

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

◆ setRelations()

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

This method tries to determine the type of relation to other tables and sets it based on the $TCA column configuration

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

Definition at line 87 of file ColumnMapFactory.php.

References TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMapFactory\setManyToManyRelation(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMapFactory\setOneToManyRelation(), TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMapFactory\setOneToOneRelation(), and TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap\setTypeOfRelation().

Referenced by TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMapFactory\create().

◆ setType()

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