code: public function findOneLastPost($site)
      {
          // select
          $qb = $this->getQueryBuilder()
                  ->select('p.id, p.title, p.description, p.slug, p.published, i.path as image_path')
                  ->leftJoin('p.images', 'i')
  
                  ->andWhere('p.highlighted=1')
                  ->setMaxResults(1)
                  ->orderBy('p.published', 'DESC');
          return $qb->getQuery()->getOneOrNullResult(\Doctrine\ORM\Query::HYDRATE_ARRAY);
      }
docs: Find last Post with image for a specyfic site
  
  @param type $site
  @return array