/** * {@inheritdoc} */ public function apply(Criteria $criteria, FilterValue $value = null) { $val = null !== $value ? $value->getValue() : $this->getDefaultValue(); if (!empty($val)) { $criteria->orderBy($val); } }
/** * {@inheritdoc} */ public function apply(Criteria $criteria, FilterValue $value = null) { $val = null !== $value ? $value->getValue() : $this->getDefaultValue(); if (null !== $val) { $criteria->setMaxResults($val); } }
/** * {@inheritdoc} */ public function apply(Criteria $criteria, FilterValue $value = null) { $val = null !== $value ? $value->getValue() : $this->getDefaultValue(); if (null !== $val) { $pageSize = $criteria->getMaxResults(); if (null !== $pageSize) { $criteria->setFirstResult(QueryUtils::getPageOffset($val, $pageSize)); } } }
/** * {@inheritdoc} */ public function createExpression(FilterValue $value = null) { if (null !== $value) { $operator = $value->getOperator(); $val = $value->getValue(); } else { $operator = null; $val = $this->getDefaultValue(); if (null !== $val) { $operator = self::EQ; } } return null !== $operator ? $this->buildExpression($this->field, $operator, $val) : null; }