‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Preparations\TcaPreparation Class Reference

Public Member Functions

 prepare (array $tca)
 

Static Public Member Functions

static prepareFileExtensions (mixed $fileExtensions)
 

Protected Member Functions

 configureCategoryRelations (array $tca)
 
 configureFileReferences (array $tca)
 

Detailed Description

Prepare TCA. Used in bootstrap and Flex Form Data Structures.

Class and API may change any time.

Definition at line 27 of file TcaPreparation.php.

Member Function Documentation

◆ configureCategoryRelations()

TYPO3\CMS\Core\Preparations\TcaPreparation::configureCategoryRelations ( array  $tca)
protected

Prepares TCA configuration of type='category' fields.

It adds some TCA config settings so category fields end up with similar config as type='select' field, but in a more restricted way. Some settings could also be set in TCA directly, but some fields can not be overridden, e.g. foreign_table.

This also sets necessary MM properties, in case relationship is set to "manyToMany" (which is the default).

Finally all category fields with a "manyToMany" relationship are added to the MM_oppositeUsage of sys_category "items".

Important: Since this method defines a "foreign_table_where", this must always be executed before prepareQuotingOfTableNamesAndColumnNames().

Parameters
array$tca

Definition at line 67 of file TcaPreparation.php.

References $tca.

Referenced by TYPO3\CMS\Core\Preparations\TcaPreparation\prepare().

◆ configureFileReferences()

TYPO3\CMS\Core\Preparations\TcaPreparation::configureFileReferences ( array  $tca)
protected

◆ prepare()

TYPO3\CMS\Core\Preparations\TcaPreparation::prepare ( array  $tca)

Prepare TCA

This class is typically called within bootstrap with empty caches after all TCA files from extensions have been loaded. The preparation is then applied and the prepared result is cached. For flex form TCA, this class is called dynamically if opening a record in the backend.

See unit tests for details.

Parameters
array$tca

Definition at line 41 of file TcaPreparation.php.

References $tca, TYPO3\CMS\Core\Preparations\TcaPreparation\configureCategoryRelations(), and TYPO3\CMS\Core\Preparations\TcaPreparation\configureFileReferences().

◆ prepareFileExtensions()

static TYPO3\CMS\Core\Preparations\TcaPreparation::prepareFileExtensions ( mixed  $fileExtensions)
static