public function findLastUpdated($limit = 5)
    {
        $query = $this->createQueryBuilder('c')
            ->orderBy('c.updatedAt', 'DESC')
            ->where('c.layout = :layout')
            ->setParameter(':layout', false)
            ->setMaxResults($limit)
            ->getQuery();

        return $query->getResult();
    }
public function findLastUpdated($limit = 5)
    {
        $query = $this->createQueryBuilder('c')
            ->orderBy('c.updatedAt', 'DESC')
            ->where('c.layout = :layout')
            ->setParameter(':layout', false)
            ->setMaxResults($limit)
            ->getQuery();

        return $query->getResult();
    }
public function findLastUpdated ( $ limit = 5 ) { $ query = $ this -> createQueryBuilder ( 'c' ) -> orderBy ( 'c.updatedAt' , 'DESC' ) -> where ( 'c.layout = :layout' ) -> setParameter ( ':layout' , false ) -> setMaxResults ( $ limit ) -> getQuery ( ) ; return $ query -> getResult ( ) ; }
Find the last updated content items.

@param int $limit

@return ArrayCollection
Find the last updated content items .