tttpapi
tttpapi

Reputation: 897

TYPO3 using TCA in class

When I check TCA in backend I have structure like that.

fe_users
  columns
    many columns...

When I use $GLOBALS['TCA']['fe_users']['columns'] in the code I get NULL. If I call t3lib_div::loadTCA('fe_users') before $GLOBALS then I get some of the columns but still not all of them.

I have in ext_tables.php

t3lib_div::loadTCA('fe_users');
t3lib_extMgm::addTCAcolumns('fe_users',$tempColumns,1);
t3lib_extMgm::addToAllTCAtypes('fe_users','columnname', '', 'after:disable');

How can I reach the rest of the columns?

Thanks

Upvotes: 0

Views: 743

Answers (1)

tmt
tmt

Reputation: 8654

Use the following code at the beginning of the frontend method where you want to access the TCA settings:

global $TCA;
tslib_fe::includeTCA();
t3lib_div::loadTCA('fe_users');

Then you can access the TCA settings in the $TCA array.

Upvotes: 2

Related Questions