• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/propertyindex/facet.php
  • Класс: BitrixIblockPropertyIndexFacet
  • Вызов: Facet::addNumericPropertyFilter
public function addNumericPropertyFilter($propertyId, $operator, $value)
{
	$facetId = $this->storage->propertyIdToFacetId($propertyId);
	if ($operator == "<=" || $operator == ">=")
	{
		$this->where[$operator.$facetId] = array(
			"TYPE" => Storage::NUMERIC,
			"OP" => $operator,
			"FACET_ID" => $facetId,
			"VALUES" => array(doubleval($value)),
		);
		if (isset($this->where[">=".$facetId]) && isset($this->where["<=".$facetId]))
		{
			$this->where["><".$facetId] = array(
				"TYPE" => Storage::NUMERIC,
				"OP" => "><",
				"FACET_ID" => $facetId,
				"VALUES" => array(
					$this->where[">=".$facetId]["VALUES"][0],
					$this->where["<=".$facetId]["VALUES"][0]
				),
			);
			unset($this->where[">=".$facetId]);
			unset($this->where["<=".$facetId]);
		}
	}
}