[英]TYPO3 using TCA in class
When I check TCA in backend I have structure like that. 当我在后端检查TCA时,我有这样的结构。
fe_users
columns
many columns...
When I use $GLOBALS['TCA']['fe_users']['columns']
in the code I get NULL
. 当我在代码中使用
$GLOBALS['TCA']['fe_users']['columns']
时,我得到NULL
。 If I call t3lib_div::loadTCA('fe_users')
before $GLOBALS then I get some of the columns but still not all of them. 如果我在$ GLOBALS之前调用
t3lib_div::loadTCA('fe_users')
,那么我会获得一些列,但仍然不是全部。
I have in ext_tables.php 我有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 谢谢
Use the following code at the beginning of the frontend method where you want to access the TCA settings: 在您要访问TCA设置的前端方法的开头使用以下代码:
global $TCA;
tslib_fe::includeTCA();
t3lib_div::loadTCA('fe_users');
Then you can access the TCA settings in the $TCA
array. 然后,您可以访问
$TCA
数组中的TCA设置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.