[TYPO3-dev] sys_categories: API conflicts with core

Caspar Stuebs caspar at gosign.de
Wed Sep 3 13:53:16 CEST 2014


Hi André,

> But is this really usefull?
> To have a file /Configuration/TCA/table_name.php and also
/Configuration/TCA/Overrides/table_name.php for just one table?
I think it is the correct way to do add categories to own tables.

> But as /Configuration/TCA/table_name.php just returns the array, it is
not possible to add the call to the catagory-api in THIS file. Ist hat
right?
That is right, as far as I know.

Regards
Caspar

2014-09-03 13:45 GMT+02:00 André Spindler <typo3 at andre-spindler.de>:

> Hi Caspar,
>
> thank you for the answer.
> So some member of the core team should update the comment in the core
> class...
>
> At the moment I use a different way to add the category field:
> If have added an "override" file for that task to use caching of the TCA.
>
> But is this really usefull?
> To have a file /Configuration/TCA/table_name.php and also
> /Configuration/TCA/Overrides/table_name.php for just one table?
> But as /Configuration/TCA/table_name.php just returns the array, it is not
> possible to add the call to the catagory-api in THIS file. Ist hat right?
>
> Regards,
> André
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: typo3-dev-bounces at lists.typo3.org [mailto:
> typo3-dev-bounces at lists.typo3.org] Im Auftrag von Caspar Stuebs
> Gesendet: Mittwoch, 3. September 2014 13:34
> An: List for Core-/Extension development
> Betreff: Re: [TYPO3-dev] sys_categories: API conflicts with core
>
> Hi André,
>
> the function ExtensionManagementUtility::makeCategorizable() changes the
> TCA. Due to that it won't work in ext_localconf.php files, because the TCA
> is generated after the include of these files.
>
> Kind Regards
> Caspar
>
>
> 2014-09-03 12:27 GMT+02:00 André Spindler <typo3 at andre-spindler.de>:
>
> > 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é
> >
> > _______________________________________________
> > TYPO3-dev mailing list
> > TYPO3-dev at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
> >
>
> --
> --
>
> Gosign media. GmbH | We web ideas.
> Langenfelder Damm 67 Gewerbehof | 22525 Hamburg
> Telefon 040-609 40 79-0
>
> Handelsregister AG HH HRB 112197 | Geschäftsführung Bert Gogolin
> Greenpeace energy: Gosign läuft mit ehrlichem Strom und Gas.
> GLS Bank: Gosign wirtschaftet mit Gewissen.
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>

-- 
-- 

Gosign media. GmbH | We web ideas.
Langenfelder Damm 67 Gewerbehof | 22525 Hamburg
Telefon 040-609 40 79-0

Handelsregister AG HH HRB 112197 | Geschäftsführung Bert Gogolin
Greenpeace energy: Gosign läuft mit ehrlichem Strom und Gas.
GLS Bank: Gosign wirtschaftet mit Gewissen. 



More information about the TYPO3-dev mailing list