public function Criteria::orderBy in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php \Doctrine\Common\Collections\Criteria::orderBy()
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 vendor/
doctrine/ collections/ lib/ Doctrine/ Common/ Collections/ Criteria.php - Construct a new Criteria.
File
- vendor/
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;
}