[TYPO3-mvc] Iterate through ObjectStorage Object using offset

Kevin Ulrich Moschallski km at 3digit.de
Tue May 25 17:48:34 CEST 2010


Hi,

i have an ObjectStorage Object ($contentelements) which contains an array of objects. I now want to go through the array in the object storage. When i call

$contentelements->current() 

i get the first object. When i add 

$contentelements->next() 

before this i get the second one. So far so good, but i want to set an offset, because i want to use a page browser to display the objects.

I tried to use $contentelements->offsetSet() on the object but i can't figure out how to use this properly or if this is the right way to do this.

Did somebody ever tried this, i just can't find any information on google or in this mailing list.

Thanks for help in advance.

Regards,

Kevin Moschallski


More information about the TYPO3-project-typo3v4mvc mailing list