[TYPO3-mvc] setOrderings: order by FIELD?

Bastian Waidelich bastian at typo3.org
Fri Sep 30 18:42:49 CEST 2011


Sebastian Schreiber wrote:

Hi,

> A possible use case could be the correct sorting of manually selected
> records.

True, that's a good use case.
If the output of the displaying action is cached, sorting the result via 
PHP shouldn't be a problem.
Preferably you should do this in the Repository, e.g.

/**
  * @param array<Tx_YourExt_Domain_Model_Category> $categories
public function findByCategories(array $categories) {
   // retrieve all records with the specified categories and sort result
}

Bastian


More information about the TYPO3-project-typo3v4mvc mailing list