[TYPO3-english] fn admin_get_fields()

Bernhard Kraft kraftb at kraftb.at
Fri Oct 9 19:31:45 CEST 2009


Marcel Remmy schrieb:

> i?m not about to change the field size or something, but i?d like my
> extension to 'know' of not all information could be saved to the
> database :)
> 
> how do you solve this?

In TYPO3 you have an array called "TCA": $GLOBALS['TCA']

TCA stands for "Table Configuration Array". It does not really hold the
current status of the database tables, but it describes how TYPO3
has/can use those tables and columns. You could do a:

print_r($GLOBALS['TCA']['tx_mytable']);

To get an idea how this array look like. In the "columns" subkey, all
accesible columns are listed. If you have an "input" field column, you
usually have a parameter like "max" or similar, defining how many
characters TYPO3 will allow to input into this field (when editing a
record from the List or Page module).


There is no "real" API way to retrieve this information. But if you
would really like to check if all data has been written correctly, just
retrieve the row/record after the update/insert and cross-check if every
field has its correct value.


greets,
Bernhard


More information about the TYPO3-english mailing list