Ejemplo n.º 1
0
 public function applyOrderByColumns(Filter $filter, QueryBuilderFilter $queryBuilderFilter)
 {
     $orderByColumns = $filter->getOrderByAttributes();
     foreach ($orderByColumns as $attribute => $orderItem) {
         $queryBuilderFilter->addOrderBy($attribute, $orderItem->getPosition(), $orderItem->isAscending());
     }
 }
Ejemplo n.º 2
0
 public function getQueryBuilderFilter(Filter $filter)
 {
     $queryBuilderFilter = new QueryBuilderFilter();
     $queryBuilderFilter->setSelect($filter->getAlias());
     $queryBuilderFilter->setFrom($filter->getEntityClass(), $filter->getAlias());
     $this->filterApplier->applyJoins($filter, $queryBuilderFilter);
     $this->filterApplier->applyConditions($filter, $queryBuilderFilter);
     $this->filterApplier->applyLimit($filter, $queryBuilderFilter);
     $this->filterApplier->applyOffset($filter, $queryBuilderFilter);
     $this->filterApplier->applyOrderByColumns($filter, $queryBuilderFilter);
     return $queryBuilderFilter;
 }
Ejemplo n.º 3
0
 protected function applyOffset(Filter $filter, QueryBuilderFilter $queryBuilderFilter)
 {
     if ($filter->getOffset()) {
         $queryBuilderFilter->setOffset($filter->getOffset());
     }
 }