• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/component/selector/element.php
  • Класс: BitrixIblockComponentSelectorElement
  • Вызов: Element::compileUserFilter
protected function compileUserFilter(array $filter)
{
	$result = parent::compileUserFilter($filter);

	if ($this->catalogIncluded)
	{
		$iblockId = (int)$this->getStorageItem(self::STORAGE_ENTITY_IBLOCK, 'OFFERS_IBLOCK_ID');
		$skuPropertyId = (int)$this->getStorageItem(self::STORAGE_ENTITY_IBLOCK, 'SKU_PROPERTY_ID');

		if ($iblockId > 0 && $skuPropertyId > 0)
		{
			if (isset($filter['offer']))
			{
				$subFilter = $filter['offer'];
				$subFilter['IBLOCK_ID'] = $iblockId;
				$result['=ID'] = CIBlockElement::SubQuery('PROPERTY_'.$skuPropertyId, $subFilter);
				unset($subFilter);
			}
		}
	}

	return $result;
}