• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/search/result/provider/indexsupportedprovider.php
  • Класс: Bitrix\Crm\Search\Result\Provider\IndexSupportedProvider
  • Вызов: IndexSupportedProvider::addToReferenceFilter
protected function addToReferenceFilter(ConditionTree $referenceFilter, array $entityFilter): void
{
	$sqlWhere = new \CSQLWhere();
	foreach ($entityFilter as $filterKey => $filterValue)
	{
		$operationData = $sqlWhere->makeOperation($filterKey);
		$operation = \CSQLWhere::getOperationByCode($operationData['OPERATION']);
		$field = $operationData['FIELD'];
		if ($operation === '@')
		{
			$referenceFilter->whereIn( 'ref.' . $field, $filterValue);
		}
		else
		{
			$referenceFilter->where('ref.' . $field, $operation, new SqlExpression('?', $filterValue));
		}
	}
}