[TYPO3-dev] sys_categories: API conflicts with core

André Spindler typo3 at andre-spindler.de
Wed Sep 3 12:27:13 CEST 2014


Hello,

I wan't to use the system categories in a new extension but found some
conflict here:
Categories are added by calling
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::makeCategorizable()
But where must this be called?

The API reference
(http://docs.typo3.org/typo3cms/CoreApiReference/ApiOverview/Categories/Inde
x.html#categories-activating) says:
The call to makeCategorizable() must be located in an extension's
ext_tables.php file or (since TYPO3 CMS 6.2.1) in a file from the
Configuration/TCA/Overrides folder.

Looking into the Core I found there:
	/**
	 * Makes a table categorizable by adding value into the category
registry.
	 * FOR USE IN ext_localconf.php FILES or files in
Configuration/TCA/Overrides/*.php Use the latter to benefit from TCA
caching!
	 *

So, what is right? Ext_tables.php (like API says) or ext_localconf.php (like
stated in Core)?
Or if both solutions work, what shoulb be preferred?
Ans someone should edit the API documantation then or the comment in code
:-)

I shouold mention that I the table I want the categories tob e added belongs
to my own extension, it's no core table

Thanks,
André




More information about the TYPO3-dev mailing list