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

        return $queryBuilder
            ->andWhere('article.status IN (:status)')
            ->setParameter('status', [
                PageStatus::PUBLISHED,
                PageStatus::SCHEDULED,
                PageStatus::UNPUBLISHED,
            ])
            ->orderBy('article.publishedAt', 'DESC')
            ->getQuery()
            ->getResult();
    }
public function getArticles(Blog $blog)
    {
        $queryBuilder = $this->getAll(false, $blog)
            ->getInstance();

        return $queryBuilder
            ->andWhere('article.status IN (:status)')
            ->setParameter('status', [
                PageStatus::PUBLISHED,
                PageStatus::SCHEDULED,
                PageStatus::UNPUBLISHED,
            ])
            ->orderBy('article.publishedAt', 'DESC')
            ->getQuery()
            ->getResult();
    }
public function getArticles ( Blog $ blog ) { $ queryBuilder = $ this -> getAll ( false , $ blog ) -> getInstance ( ) ; return $ queryBuilder -> andWhere ( 'article.status IN (:status)' ) -> setParameter ( 'status' , [ PageStatus :: PUBLISHED , PageStatus :: SCHEDULED , PageStatus :: UNPUBLISHED , ] ) -> orderBy ( 'article.publishedAt' , 'DESC' ) -> getQuery ( ) -> getResult ( ) ; }
Get Article by blog ordered by publication DESC.

@param Blog $blog

@return array()
Get Article by blog ordered by publication DESC .