TcaPreparation
class \
Prepare TCA. Used in bootstrap and Flex Form Data Structures.
Internal
Class and API may change any time.
Table of Contents
Methods
- prepare() : array
- Prepare TCA
- prepareFileExtensions() : string
- Ensures format, replaces placeholders and remove duplicates
- configureCategoryRelations() : array
- Prepares TCA configuration of type='category' fields.
- configureFileReferences() : array
Methods
prepare()
Prepare TCA
public
prepare(array $tca) : array
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
- $tca : array
Return values
arrayprepareFileExtensions()
Ensures format, replaces placeholders and remove duplicates
public
static prepareFileExtensions(mixed $fileExtensions) : string
Parameters
- $fileExtensions : mixed
Tags
Return values
stringconfigureCategoryRelations()
Prepares TCA configuration of type='category' fields.
protected
configureCategoryRelations(array $tca) : array
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
- $tca : array
Return values
arrayconfigureFileReferences()
protected
configureFileReferences(array $tca) : array
Parameters
- $tca : array