/** * @param RequestFilterInterface|RangeFilterRequest $filter * @param bool $isNegation * @return string */ private function getRightConditionPart(RequestFilterInterface $filter, $isNegation) { return $this->getPart($filter->getField(), $isNegation ? self::CONDITION_PART_GREATER_THAN : self::CONDITION_PART_LOWER_THAN, $filter->getTo()); }
/** * @param \Magento\Framework\Search\Request\FilterInterface $filter * @return \Magento\Framework\DB\Select */ public function buildFilter(\Magento\Framework\Search\Request\FilterInterface $filter) { $adapter = $this->resource->getConnection(Resource::DEFAULT_READ_RESOURCE); /** @var \Magento\Framework\Search\Request\Filter\Range $filter */ return $this->generateCondition($filter->getField(), $filter->getFrom(), $filter->getTo(), $adapter); }