• Модуль: iblock
  • Путь к файлу: ~/bitrix/modules/iblock/lib/component/base.php
  • Класс: BitrixIblockComponentBase
  • Вызов: Base::getTemplatePropCell
protected function getTemplatePropCell($code, $offer, &$matrixFields, $skuPropList)
{
	$cell = array(
		'VALUE' => 0,
		'SORT' => PHP_INT_MAX,
		'NA' => true
	);

	if (isset($offer['DISPLAY_PROPERTIES'][$code]))
	{
		$matrixFields[$code] = true;
		$cell['NA'] = false;

		if ($skuPropList[$code]['USER_TYPE'] === 'directory')
		{
			$intValue = $skuPropList[$code]['XML_MAP'][$offer['DISPLAY_PROPERTIES'][$code]['VALUE']];
			$cell['VALUE'] = $intValue;
		}
		elseif ($skuPropList[$code]['PROPERTY_TYPE'] === 'L')
		{
			$cell['VALUE'] = (int)$offer['DISPLAY_PROPERTIES'][$code]['VALUE_ENUM_ID'];
		}
		elseif ($skuPropList[$code]['PROPERTY_TYPE'] === 'E')
		{
			$cell['VALUE'] = (int)$offer['DISPLAY_PROPERTIES'][$code]['VALUE'];
		}

		$cell['SORT'] = $skuPropList[$code]['VALUES'][$cell['VALUE']]['SORT'];
	}

	return $cell;
}