[TYPO3-dev] irre something like foreign_table_where

Stano Paška stano.paska at gmail.com
Wed Nov 2 16:13:17 CET 2011


Hi Ingmar.

This is exactly what I need.
I backported it into our TYPO3 4.5 installation and it works perfectly.

Thank you very much.

Stano.


On 2.11.2011 15:11, Ingmar Schlecht wrote:
> Hi Stano,
>
> maybe this is something for you:
> http://forge.typo3.org/issues/29296
>
> It's not part of the core yet, but will probably be integrated into
> TYPO3 4.7.
>
> cheers
> Ingmar
>
> Am 02.11.2011 14:51, schrieb Stano Paška:
>> Hi list.
>>
>> I am making some extension with irre records.
>> I have one record with six irre relations to same subrecords.
>> Subrecord has one field "category".
>>
>> I need filter out subrecords, that in Accommodation relation appears
>> only subrecords with accommodation category selected.
>>
>> This can be done with something like foreign_table_where, but this is
>> not implemented in TCA type='inlíne'.
>>
>> # irre
>> $irre = array(
>>      'type' =>  'inline',
>>      'foreign_table' =>  'tx_kiosreviews_record',
>>      'foreign_field' =>  'review',
>>      'foreign_label' =>  'usertext',
>>      'appearance' =>  array('collapseAll' =>  1, 'expandSingle' =>  1),
>> );
>> $TCA['tx_kiosreviews_review']['columns']['accommodationirre']['config']
>> = $irre;
>> $TCA['tx_kiosreviews_review']['columns']['accommodationirre']['config']['foreign_table_where']
>> = ' AND category=1';
>> $TCA['tx_kiosreviews_review']['columns']['foodirre']['config'] = $irre;
>> $TCA['tx_kiosreviews_review']['columns']['foodirre']['config']['foreign_table_where']
>> = ' AND category=2';
>>
>>
>> Can be done this with another way?
>>
>> Thanks for your answers.
>>
>> Stano.
>




More information about the TYPO3-dev mailing list