protected processInterogation ( |
||
$search | The search from which the query is build, if the search does not reflect any interogation no actions needs to be taken, *(not null not empty). | |
$qb | Doctrine\ORM\QueryBuilder | The Doctrine query builder to be constructed on, *(not null not empty). |
protected function processInterogation(Search $search, QueryBuilder $qb)
{
foreach ($search->getAllColumns() as $column) {
/** @var $column Newscoop\Service\Model\Search\ColumnOrderLike */
if ($column instanceof ColumnOrderLike) {
$like = $column->getLike();
if (!empty($like)) {
$name = $this->map($search, $column);
$field = self::ALIAS . '.' . $name;
$qb->andWhere($field . ' like :' . $name);
$qb->setParameter($name, $like);
}
}
}
}