• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/component/selector/element.php
  • Класс: BitrixIblockComponentSelectorElement
  • Вызов: Element::initEntitySettings
protected function initEntitySettings()
{
	parent::initEntitySettings();
	if (!$this->catalogIncluded)
		return;
	$iblockId = (int)$this->getStorageItem(self::STORAGE_ENTITY_IBLOCK, 'IBLOCK_ID');
	if ($iblockId > 0)
	{
		$description = [
			'CATALOG_TYPE' => null,
			'OFFERS_IBLOCK_ID' => null,
			'SKU_PROPERTY_ID' => null,
		];
		$catalog = CCatalogSku::GetInfoByIBlock($iblockId);
		if (!empty($catalog))
		{
			$description['CATALOG_TYPE'] = $catalog['CATALOG_TYPE'];
			if (
				$catalog['CATALOG_TYPE'] == CCatalogSku::TYPE_FULL
				|| $catalog['CATALOG_TYPE'] == CCatalogSku::TYPE_PRODUCT
			)
			{
				$description['OFFERS_IBLOCK_ID'] = $catalog['IBLOCK_ID'];
				$description['SKU_PROPERTY_ID'] = $catalog['SKU_PROPERTY_ID'];
			}
			$description['FILTER_ALL'] = Loc::getMessage('IBLOCK_SELECTOR_ELEMENT_SLIDER_FILTER_ALL_PRODUCTS');

		}
		unset($catalog);
		$this->fillStorageNode(self::STORAGE_ENTITY_IBLOCK, $description);
		unset($description);
	}
	unset($iblockId);
}