Exemple #1
0
 public function build(array $params = array())
 {
     $query = parent::build($params);
     $params = $params + ['url' => null];
     if (isset($params['url'])) {
         $query->andWhere("u.url = :url")->setParameter('url', $params['url']);
     }
     return $query;
 }
 public function build(array $params = array())
 {
     $query = parent::build($params);
     $params = $params + ['categories' => null];
     if (isset($params['categories']) && count($params['categories'])) {
         $query->andWhere(":categories MEMBER OF {$this->alias()}.categories")->setParameter('categories', $params['categories']);
     }
     $query->addSelect("ac", "ai", "aa")->leftJoin("a.categories", "ac")->leftJoin("a.image", "ai")->leftJoin("a.author", "aa");
     return $query;
 }
Exemple #3
0
 public function build(array $params = array())
 {
     $query = parent::build($params);
     $query->addSelect("ac")->leftJoin("a.content", "ac");
     return $query;
 }