Chamilo is a learning management system focused on ease of use and accessibility
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
chamilo-lms/main/inc/Entity/Repository/PagesRepository.php

27 lines
609 B

<?php
namespace Entity\Repository;
use Doctrine\ORM\EntityRepository;
/**
* PagesRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class PagesRepository extends EntityRepository
{
public function getLatestPages($limit = null)
{
$qb = $this->createQueryBuilder('b')
->select('b')
->addOrderBy('b.created', 'DESC');
return $qb;
if (false === is_null($limit))
$qb->setMaxResults($limit);
return $qb->getQuery()
->getResult();
}
}