[TYPO3-mvc] Iterate through ObjectStorage Object using offset

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Tue May 25 18:03:48 CEST 2010


I'm not sure but I think the change Jochen applied to the Extbase trunk 
some hoursa go may help you with object storage and the offset method:
http://forge.typo3.org/repositories/diff/typo3v4-mvc/extbase/trunk/Classes/Persistence/ObjectStorage.php?rev=2287

Just export the trunk version and give it a try,
maybe it will work now.

Thomas

Am 25.05.2010 17:48, schrieb Kevin Ulrich Moschallski:
> 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