public function findForProvider()
    {
        $qb = $this->createQueryBuilder('m');
        $qb
            ->select(
                'm.id, IDENTITY(m.parent) as parent, m.name, m.route, m.parameters, m.root, '.
                'm.attributes, m.options, t.title, t.path'
            )
            ->leftJoin('m.translations', 't', Expr\Join::WITH, $qb->expr()->eq('t.locale', ':locale'))
            ->andWhere($qb->expr()->eq('m.enabled', ':enabled'))
            ->orderBy('m.left', 'ASC')
            ->addGroupBy('m.id');

        return $qb
            ->getQuery()
            ->useQueryCache(true)
            //->useResultCache(true, 3600, Menu::getEntityTagPrefix()) // TODO Use a more unique cache id and invalidate it.
            ->setParameters([
                'locale'  => $this->localeProvider->getCurrentLocale(),
                'enabled' => true,
            ])
            ->getArrayResult();
    }
public function findForProvider()
    {
        $qb = $this->createQueryBuilder('m');
        $qb
            ->select(
                'm.id, IDENTITY(m.parent) as parent, m.name, m.route, m.parameters, m.root, '.
                'm.attributes, m.options, t.title, t.path'
            )
            ->leftJoin('m.translations', 't', Expr\Join::WITH, $qb->expr()->eq('t.locale', ':locale'))
            ->andWhere($qb->expr()->eq('m.enabled', ':enabled'))
            ->orderBy('m.left', 'ASC')
            ->addGroupBy('m.id');

        return $qb
            ->getQuery()
            ->useQueryCache(true)
            //->useResultCache(true, 3600, Menu::getEntityTagPrefix()) // TODO Use a more unique cache id and invalidate it.
            ->setParameters([
                'locale'  => $this->localeProvider->getCurrentLocale(),
                'enabled' => true,
            ])
            ->getArrayResult();
    }
public function findForProvider ( ) { $ qb = $ this -> createQueryBuilder ( 'm' ) ; $ qb -> select ( 'm.id, IDENTITY(m.parent) as parent, m.name, m.route, m.parameters, m.root, ' . 'm.attributes, m.options, t.title, t.path' ) -> leftJoin ( 'm.translations' , 't' , Expr \ Join :: WITH , $ qb -> expr ( ) -> eq ( 't.locale' , ':locale' ) ) -> andWhere ( $ qb -> expr ( ) -> eq ( 'm.enabled' , ':enabled' ) ) -> orderBy ( 'm.left' , 'ASC' ) -> addGroupBy ( 'm.id' ) ; return $ qb -> getQuery ( ) -> useQueryCache ( true ) //->useResultCache(true, 3600, Menu::getEntityTagPrefix()) // TODO Use a more unique cache id and invalidate it. -> setParameters ( [ 'locale' => $ this -> localeProvider -> getCurrentLocale ( ) , 'enabled' => true , ] ) -> getArrayResult ( ) ; }
Returns the menus data for the menu provider.

@return array
Returns the menus data for the menu provider .