public function Criteria::orderBy in Plug 7
Sets the ordering of the result of this Criteria.
Keys are field and values are the order, being either ASC or DESC.
Parameters
string[] $orderings:
Return value
See also
Criteria::ASC
Criteria::DESC
1 call to Criteria::orderBy()
- Criteria::__construct in lib/
doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ Criteria.php - Construct a new Criteria.
File
- lib/
doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ Criteria.php, line 200
Class
- Criteria
- Criteria for filtering Selectable collections.
Namespace
Doctrine\Common\CollectionsCode
public function orderBy(array $orderings) {
$this->orderings = array_map(function ($ordering) {
return strtoupper($ordering) === Criteria::ASC ? Criteria::ASC : Criteria::DESC;
}, $orderings);
return $this;
}