• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/classes/general/iblockelement.php
  • Класс: CAllIBlockElement
  • Вызов: CAllIBlockElement::getOfferProperties
protected function getOfferProperties(int $iblockId): ?array
{
	if ($iblockId <= 0)
	{
		return null;
	}
	if (!$this->catalogIncluded)
	{
		return null;
	}

	if (!isset($this->offerProperties[$iblockId]))
	{
		$this->offerProperties[$iblockId] = array();
		$catalog = CCatalogSku::GetInfoByOfferIBlock($iblockId);
		if (!empty($catalog))
		{
			$ids = CatalogProductPropertyCatalogFeature::getOfferTreePropertyCodes($catalog['IBLOCK_ID']);
			if (!empty($ids))
			{
				$this->offerProperties[$iblockId] = $this->getPropertiesByFilter(array(
					'=IBLOCK_ID' => $catalog['IBLOCK_ID'],
					'=ACTIVE' => 'Y',
					'@ID' => $ids
				));
				if (empty($this->offerProperties[$iblockId]))
				{
					$this->offerProperties[$iblockId] = array();
				}
			}
		}
	}
	return (!empty($this->offerProperties[$iblockId]) ? $this->offerProperties[$iblockId] : null);
}