public function getOrdered($direction = 'asc')
{
$modules = $this->enabled();
uasort($modules, function (Module $a, Module $b) use($direction) {
if ($a->order == $b->order) {
return 0;
}
if ($direction == 'desc') {
return $a->order < $b->order ? 1 : -1;
}
return $a->order > $b->order ? 1 : -1;
});
return $modules;
}