[TYPO3-dev] Sorting TCA items

Jigal van Hemert jigal at xs4all.nl
Mon Aug 15 09:36:28 CEST 2011


Hi,

On 15-8-2011 0:11, ktt wrote:
> It is possible to set static TCA items:
>                  'items' =>  array (
> array('LLL:EXT:modify_some/locallang_db.xml:modify_some_Fa.se.I.0', '1'),
> array('LLL:EXT:modify_some/locallang_db.xml:modify_some_Fa.se.I.1', '2'),
>                  ),
> Is it possible to sort them after TCA being set?

In the itemsProcFunc property you can set the user function which 
processes the items. This function will receive the configuration 
parameters (array) for this TCA element as the first parameters.
In this array is also the list of items (index 'items').

You can change this list as you like in your user function.

The parameters are sent by reference, so you can directly change the 
items and you don't need to return anything.

-- 
Kind regards / met vriendelijke groet,

Jigal van Hemert.




More information about the TYPO3-dev mailing list