[TYPO3-ect] mergeExtendingTCAs

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Thu Sep 7 13:53:45 CEST 2006


Franz Holzinger schrieb:
> Hello Elmar,
> 
>> I hope I understand the problem. Here comes the information you demand:
>>
>>     tx_div::loadTcaAdditions($ext_keys);
>>
> /* loadTcaAdditions($ext_keys)
> *
> * Your extension may depend on fields that are added by other
> * extensios. For reasons of performance parts of the TCA are only
> * loaded on demand. To ensure that the extended TCA is loaded for
> * the extensions you depend on or which extend your extension by
> * hooks, you shall apply this function.
> *
> * @param array     extension keys which have TCA additions to load
> */
> function loadTcaAdditions($ext_keys){
>     global $_EXTKEY, $TCA;
>     
>     //Merge all ext_keys
>     if (is_array($ext_keys)) {
>     for($i = 0; $i < sizeof($ext_keys); $i++){
>         //Include the ext_table
>         $_EXTKEY = $ext_keys[$i]; // added by F.Rakow
>         include(t3lib_extMgm::extPath($ext_keys[$i]).'ext_tables.php');
>     }
>     }
> }
> 
> 
> But the extension authors must add there extensions to this list by 
> themselves:
> 
> ext_localconf.php:
> 
> if (!defined ('STATIC_INFO_TABLES_EXTkey')) {
>     define('STATIC_INFO_TABLES_EXTkey','static_info_tables');
> }
> 
> $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['extendingTCA'][] 
> = $_EXTKEY;
> 
> I think we should make this array key name 'extendingTCA' common for all 
> extensions. Where should this be documented?

That doesn't look right to me. As a workaround, yes, but not as THE solution.

TYPO3 4.1 should have a better way to deal with the growing demand to have 
the TCA available in the FE.

Masi



More information about the TYPO3-team-extension-coordination mailing list