public function findLastCreated($limit = 5)
    {
        $query = $this->createQueryBuilder('c')
            ->orderBy('c.createdAt', 'DESC')
            ->setMaxResults($limit)
            ->getQuery();

        return $query->getResult();
    }
public function findLastCreated($limit = 5)
    {
        $query = $this->createQueryBuilder('c')
            ->orderBy('c.createdAt', 'DESC')
            ->setMaxResults($limit)
            ->getQuery();

        return $query->getResult();
    }
public function findLastCreated ( $ limit = 5 ) { $ query = $ this -> createQueryBuilder ( 'c' ) -> orderBy ( 'c.createdAt' , 'DESC' ) -> setMaxResults ( $ limit ) -> getQuery ( ) ; return $ query -> getResult ( ) ; }
Find the last created content items.

@param int $limit

@return ArrayCollection
Find the last created content items .