Sort menu by priority

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-02-09 11:35:27 +01:00 committed by Roeland Jago Douma
parent 4a1cbefc90
commit 7cd0340366
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 3 additions and 0 deletions

View File

@ -137,6 +137,9 @@ class PublicTemplateResponse extends TemplateResponse {
$list[] = $action;
}
}
usort($list, function(IMenuAction $a, IMenuAction $b) {
return $a->getPriority() > $b->getPriority();
});
return $list;
}