[TYPO3-mvc] Sorting Extbase ObjectStorage

Dmitri Pisarev dimaip at gmail.com
Sun Jun 6 22:42:02 CEST 2010


On 06.06.2010 21:28, Dmitri Pisarev wrote:
> On 21.01.2010 16:43, David Schreiber wrote:
>> Hello everybody,
>>
>> When accessing my objects by a repository, I can easily sort the
>> objects I get by creating an appropriate query. But ObjectStorages
>> seem to contain an unsorted array of my objects (or I don't understand
>> how the objects are sorted inside).
>>
>> Is there a way to sort an ObjectStorage by a specific property of the
>> contained objects (in my case the sorting property)?
>>
>> Or would I need to write a small sorting function for this?
>>
>> Thank you,
>> David Schreiber
> Sorry to bring back an old thread. While we are waiting for
> 'default_sortby' to be honored, how do I sort ObjectStorage in the getter?
>
> Dmitri.
I had to do the sorting in the ViewHelper, because I couldn't figure out 
how to sort ObjectStorage.


More information about the TYPO3-project-typo3v4mvc mailing list