public function getMediaFolderByLevels($levels)
    {
        $qb = $this->createQueryBuilder('mf')
                   ->andWhere('mf._level IN (:levels)')
                   ->setParameter('levels', $levels)
                   ->orderBy('mf._leftnode', 'asc');

        return $qb->getQuery()->getResult();
    }
public function getMediaFolderByLevels($levels)
    {
        $qb = $this->createQueryBuilder('mf')
                   ->andWhere('mf._level IN (:levels)')
                   ->setParameter('levels', $levels)
                   ->orderBy('mf._leftnode', 'asc');

        return $qb->getQuery()->getResult();
    }
public function getMediaFolderByLevels ( $ levels ) { $ qb = $ this -> createQueryBuilder ( 'mf' ) -> andWhere ( 'mf._level IN (:levels)' ) -> setParameter ( 'levels' , $ levels ) -> orderBy ( 'mf._leftnode' , 'asc' ) ; return $ qb -> getQuery ( ) -> getResult ( ) ; }
Get media folder by levels.

@param $levels
@return array
Get media folder by levels .