[TYPO3-english] Random order on extbase

Sergio naguib.mahfuz at gmail.com
Thu Jan 17 17:16:07 CET 2013


Thank you both for the information you provided me.

I just realized there's now random order in extbase for my purposes (I 
need to order a bunch of elements, not only one), so the only thing it 
occurs to me is to shuffle the query result in PHP.

For that purpose I would do:

$array = $query->execute()->toArray();
shuffle($array);

But would you know how I could cast this $array to 
"Tx_Extbase_Persistence_QueryResult" class again to be able to return 
all the objects as a query ?

Thanks,
Sergio


More information about the TYPO3-english mailing list