• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/component/element.php
  • Класс: BitrixIblockComponentElement
  • Вызов: Element::getElementList
protected function getElementList($iblockId, $products)
{
	$section = $this->getSection();

	if ($this->arParams['STRICT_SECTION_CHECK'])
	{
		$sectionId = !empty($section) ? $section['ID'] : 0;

		if ($this->arParams['USE_MAIN_ELEMENT_SECTION'])
		{
			$this->filterFields['IBLOCK_SECTION_ID'] = $sectionId;
		}
		else
		{
			$this->filterFields['SECTION_ID'] = $sectionId;
			$this->filterFields['INCLUDE_SUBSECTIONS'] = 'N';
		}
	}

	$elementIterator = parent::getElementList($iblockId, $products);

	if (!empty($elementIterator) && !$this->arParams['USE_MAIN_ELEMENT_SECTION'])
	{
		$elementIterator->SetSectionContext($section);
	}

	$this->storage['SECTION'] = $section;

	return $elementIterator;
}