[TYPO3-english] need help on customizing TCA

François Suter fsu-lists at cobweb.ch
Fri Nov 5 20:32:15 CET 2010


> The TCA looks like (myx is the name of my extension):
> $TCA['myx'] = array(
>   'ctrl' =>  $TCA['myx']['ctrl'],
>   'interface' =>  array( ... ) ...
> most entries are at level of ctrl or interface, so I placed it wrong.
> What does the second line mean? Isn't it a circular reference?

The TCA for a given table is generally split into two files:

- the "ctrl" section goes into ext_tables.php
- the rest of the TCA goes to tca.php

The point is that - most of the time - TYPO3 needs to know only about 
the "ctrl" section of each table. Occasionally it needs more details, in 
which case the full TCA is loaded. This is done by calling:


This checks the "dynamicConfigFile" property of the "ctrl" section and 
loads the corresponding file. To make sure that the "ctrl" section is 
not lost, the tca.php file contains:

$TCA['myx'] = array(
	'ctrl' =>  $TCA['myx']['ctrl'],

I hope this explains a bit more.

> So would it be right to code something like:
> $TCA['myx']['ctrl']['divider2tabs'] = 2;


> The TCA seems quite a bit complex.

It is. It's also quite powerful so hang on and you'll get it ;-)

You may want to look at existing extensions to compare the code. In 
particular, there's one called "examples" which contains the code 
samples corresponding to the "Core API" manual. Although it is far from 
complete, it is meant to provide useful examples and code snippets to 
extension developers.



Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch

More information about the TYPO3-english mailing list