/** * Прнименяет условие на выборку "BETWEEN" * @param ISelectBuilder $selectBuilder * @return $this */ protected function applyBetweenCondition(ISelectBuilder $selectBuilder) { list($minValue, $maxValue) = $this->expression; $minPlaceholder = $this->placeholder . ISelector::PLACEHOLDER_SEPARATOR . 'min'; $maxPlaceholder = $this->placeholder . ISelector::PLACEHOLDER_SEPARATOR . 'max'; $selectBuilder->begin()->expr($this->fieldColumn, IFieldCondition::OPERATOR_EQMORE, $minPlaceholder)->expr($this->fieldColumn, IFieldCondition::OPERATOR_EQLESS, $maxPlaceholder)->bindValue($minPlaceholder, $minValue, $this->field->getDataType())->bindValue($maxPlaceholder, $maxValue, $this->field->getDataType())->end(); return $this; }
/** * Применяет фильтры поля к значению свойства * @param mixed $propertyValue * @return mixed */ protected function applyFilters($propertyValue) { $filterConfig = $this->field->getFiltersConfig($this->getLocaleId()); if (count($filterConfig)) { $filterCollection = $this->createFilterCollection($filterConfig); $propertyValue = $filterCollection->filter($propertyValue); } return $propertyValue; }