[TYPO3-dev] CONTENT: add support for virtual table

Xavier Perseguers typo3 at perseguers.ch
Thu Oct 21 17:20:28 CEST 2010


Hi,

> While I said "yes" I don't think that it is essential that the whole PHP array is transformed to TS.
> The main issue in my projects was that I have data structured in an array (or an objcet implementing
> the Iterator interface) that I wanted to use in a way like CONTENT.

Thus something like I did, right?

My use case would be for EXT:mantis_connect. You connect to Mantis using 
SOAP and retrieve a list of issues from a given project (you get issue 
id, description, author, ...) and want to output that using some 
TEMPLATE object or using pure-TS. Thus you need a way to loop over each 
issue "record" to render it.

This would be made by a user function in EXT:mantis_connect that would 
return the array or issue records, that's all, then you should be able, 
without any further extension, to render it on your website.

> Why would you need functions like array_shift in a template? Looks like business logic to me :)

I agree.

> Maybe this could work:
>
> myAssocArray = MAP
> myAssocArray.keyA = value
> myAssocArray := pushItem(keyB,another value)
>
> I'm using MAP (short for key-value-map) instead of ARRAY to make clear that this structire has no
> numeric keys, but avoid the long ASSOCIATIVE_ARRAY.

Could you give some use-case/pseudo-TS of what you'd like to do with 
your MAP?

Xavier




More information about the TYPO3-dev mailing list