Feature: #67875 - Override CategoryRegistry entries¶
See forge#67875
Description¶
The make
method of the \TYPO3\
class has been extended with a new parameter override
to set a new category configuration for
an already registered table / field combination.
If the parameter is set to TRUE
, previously defined registry entries are cleared for the
current table / field combination before adding the new configuration.
The intended usecase for this method is to add additional TCA types for a previously registered table.
A good example is the tt_
table:
- The basic TCA is defined in the
frontend
Extension. - After the processing of the normal TCA definition, the default categorized tables (from the install
tool setting
SYS/
) are initialized and the categories tab is added to thedefault Categorized Tables showitem
configuration for all TCA types that exist so far. - Now the TCA overrides are processed. The
css_
Extension defines additional TCA types. After the types are defined thestyled_ content add
method is called to add the category tab to them.Or Override ()
Impact¶
The current behavior of the existing functionality is not changed. Only new functionality is added.
Example¶
// This example is from the tt_content TCA overrides file from the css_styled_content Extension.
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable('css_styled_content', 'tt_content', 'categories', array(), TRUE);
Copied!