public function getAll($excludeUnpublished = false, Blog $blog = null)
    {
        $this->clearInstance();
        $this->qb = $this->getInstance();

        //If $excludeUnpublished === true, we exclude the non published results
        if ($excludeUnpublished) {
            $this->qb
                ->andWhere('article.status = :status')
                ->orWhere('article.status = :scheduled_status AND article.publishedAt <= :now')
                ->setParameter('status', PageStatus::PUBLISHED)
                ->setParameter('scheduled_status', PageStatus::SCHEDULED)
                ->setParameter('now', new \DateTime());
        }

        if (null != $blog) {
            $this->qb
                ->andWhere('article.blog = :blog')
                ->setParameter('blog', $blog->getId());
        }

        return $this;
    }