src/PageBuilder/Model/ResourceModel.php
public function getGenericResources($limit = 10, $mode = AbstractQuery::HYDRATE_OBJECT)
    {
        $builder = $this->getEntityManager()->createQueryBuilder();

        $builder->select('e')
            ->from($this->getEntity(), 'e')
            ->where('e.isGeneric = 1')
            ->setMaxResults($limit);

        $query = LocaleAwareTrait::addHints($builder->getQuery());

        return $query->execute($mode);
    }
public function getGenericResources($limit = 10, $mode = AbstractQuery::HYDRATE_OBJECT)
    {
        $builder = $this->getEntityManager()->createQueryBuilder();

        $builder->select('e')
            ->from($this->getEntity(), 'e')
            ->where('e.isGeneric = 1')
            ->setMaxResults($limit);

        $query = LocaleAwareTrait::addHints($builder->getQuery());

        return $query->execute($mode);
    }
public function getGenericResources ( $ limit = 10 , $ mode = AbstractQuery :: HYDRATE_OBJECT ) { $ builder = $ this -> getEntityManager ( ) -> createQueryBuilder ( ) ; $ builder -> select ( 'e' ) -> from ( $ this -> getEntity ( ) , 'e' ) -> where ( 'e.isGeneric = 1' ) -> setMaxResults ( $ limit ) ; $ query = LocaleAwareTrait :: addHints ( $ builder -> getQuery ( ) ) ; return $ query -> execute ( $ mode ) ; }
List Generic Resources

@param int $limit
@param int $mode

@return mixed
List Generic Resources