Bundle/BlogBundle/Repository/ArticleRepository.php
public function getDrafts(Blog $blog)
    {
        $queryBuilder = $this->getAll(false, $blog)
            ->getInstance();

        return $queryBuilder
            ->andWhere('article.status = :status')
            ->setParameter('status', PageStatus::DRAFT)
            ->orderBy('article.createdAt', 'DESC')
            ->getQuery()
            ->getResult();
    }
public function getDrafts(Blog $blog)
    {
        $queryBuilder = $this->getAll(false, $blog)
            ->getInstance();

        return $queryBuilder
            ->andWhere('article.status = :status')
            ->setParameter('status', PageStatus::DRAFT)
            ->orderBy('article.createdAt', 'DESC')
            ->getQuery()
            ->getResult();
    }
public function getDrafts ( Blog $ blog ) { $ queryBuilder = $ this -> getAll ( false , $ blog ) -> getInstance ( ) ; return $ queryBuilder -> andWhere ( 'article.status = :status' ) -> setParameter ( 'status' , PageStatus :: DRAFT ) -> orderBy ( 'article.createdAt' , 'DESC' ) -> getQuery ( ) -> getResult ( ) ; }
Get articles by blog ordered by creation DESC.

@param Blog $blog

@return array()
Get articles by blog ordered by creation DESC .