mirror of
https://github.com/getgrav/grav.git
synced 2026-03-06 12:31:53 +01:00
Added FlexCollection::sort() method
This commit is contained in:
@@ -117,6 +117,13 @@ class FlexCollection extends ObjectCollection implements FlexCollectionInterface
|
||||
return $type . $this->_flexDirectory->getType();
|
||||
}
|
||||
|
||||
public function sort(array $order) // : FlexCollection
|
||||
{
|
||||
$criteria = Criteria::create()->orderBy($order);
|
||||
|
||||
return $this->matching($criteria);
|
||||
}
|
||||
|
||||
/**
|
||||
* Twig example: {% render collection layout 'edit' with {my_check: true} %}
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user