[TYPO3] $tempColumns ??

Aji Johannes aji.yahya at gmail.com
Tue Aug 15 22:53:07 CEST 2006


Tapio Markula schrieb:
> Aji Johannes wrote:
>> Dmitry Dulepov schrieb:
>>
>>> Hi!
>>>
>>> Aji Johannes wrote:
>>>
>>>> i have an Question about ext_tables.php.
>>>
>>>
>>> I read carefully but do not see the question.
>>>
>>> In any case reading "TYPO3 core APIs" should give you information 
>>> about $TCA. This will help you to set appropriate default values.
>>>
>> Hello Dmitry,
>>
>> thanks i get it.
>>
>> i do  like this   : 'items' => Array (Array('', 0),),
>>
>>
>> this the whole script :
>>
>>
>> $tempColumns = Array (
>>     "tx_xxxx" => Array (
>>         "exclude" => 0,
>>         "label" =>"LLL:EXT:xxxx/locallang_db.php:pages.tx_xxxx",
>>
>>         "config" => Array (
>>             "type" => "select",
>>         "items" => Array (
>>                   Array('', 0),
>>                  ),
>>             "foreign_table" => "tx_xxxx",
>>             "foreign_table_where" => "ORDER BY tx_xxxx.uid",
>>             "size" => 1,
>>             "minitems" => 0,
>>             "maxitems" => 1,
>>             "default" => "0",
>>             "wizards" => Array(
>>             "_PADDING" => 2,
>>             "_VERTICAL" => 1,
>>
>>             "list" => Array(
>>                     "type" => "script",
>>                     "title" => "List",
>>                     "icon" => "list.gif",
>>                     "params" => Array(
>>                     "table"=>"tx_xxxx",
>>                     "pid" => "###CURRENT_PID###",
>>                             ),
>>                     "script" => "wizard_list.php",
>>                 ),
>>             ),
>>
>>
>>         )
>>     ),
>> );
> 
> the problem of this method is that it might override definitions of
> other plugins because it resets the whole '"tx_xxxx"'
> 
> That method is safe *only* for your own extensions,
> which don't modify *existing* tables.
> 
> if you want to modify existing tables
> 
> t3lib_div::loadTCA("existing_table");
> 
> and then define *only* necessary parts, for example
> $TCA['existing_table']['columns']['title']['label']=...

Hello Tapio,

thanks,  i allready do this in my ext_table.php

thanks again
Aji



More information about the TYPO3-english mailing list