protected function generateMenu()
 {
     $criteria = new Criteria();
     $criteria->orderBy(['hierarchy' => 'asc']);
     $collection = $this->adminMenuRepository->matching($criteria);
     $elements = $this->filterElements($collection, null);
     $tree = $this->generateTree($collection, $elements);
     return $tree;
 }
Ejemplo n.º 2
4
 public function getMenu()
 {
     $criteria = new Criteria();
     $criteria->orderBy(['hierarchy' => 'asc']);
     $criteria->andWhere($criteria->expr()->eq('parent', null));
     return $this->adminMenuRepository->matching($criteria);
 }