configurationManager = $configurationManager; $this->menu = $this->configurationManager->getConfiguration('Menu'); } /** * @var array */ protected $menu; protected $items = array(); /** * @param string $forMenu * @return array */ public function getItems($forMenu = NULL) { if ($forMenu){ $items = &$this->menu[$forMenu]; }else { $items = &$this->menu; } if ($items) { uasort($items, function ($a, $b) { return $a['sorting'] > $b['sorting']; }); } return $items; } }