Added FlexCollection::sort() method

This commit is contained in:
Matias Griese
2019-01-24 16:20:51 +02:00
parent 6d89108cc4
commit a09940ef6a

View File

@@ -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} %}
*