[TYPO3-mvc] Sorting Extbase ObjectStorage

Dmitri Pisarev dimaip at gmail.com
Sun Jun 6 19:28:32 CEST 2010


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.


More information about the TYPO3-project-typo3v4mvc mailing list