Skip to content
Snippets Groups Projects
Commit 0eed1e77 authored by llaffont's avatar llaffont
Browse files

Tri des paniers par libelle dans mon compte

parent 9980b41f
No related merge requests found
......@@ -48,6 +48,8 @@ function indexAction() {
if ($this->_user->canAccessBackend())
$paniers = array_merge($paniers, Class_PanierNotice::findAllWithCatalogue());
Class_PanierNotice::sortPaniersByLibelle($paniers);
$this->view->paniers = $paniers;
$this->view->title = $this->view->_("Vos paniers");
$this->view->message = false;
......
......@@ -79,6 +79,12 @@ class Class_PanierNotice extends Storm_Model_Abstract {
}
public static function sortPaniersByLibelle(&$paniers) {
usort($paniers,
function($a, $b) {return $a->getLibelle() > $b->getLibelle();});
}
public static function fixLostClesNoticesForAll() {
$paniers = Class_PanierNotice::findAll();
foreach($paniers as $panier) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment