- Модуль: catalog
- Путь к файлу: ~/bitrix/modules/catalog/lib/product/propertycatalogfeature.php
- Класс: BitrixCatalogProductPropertyCatalogFeature
- Вызов: PropertyCatalogFeature::getOfferTreePropertyByTypes
static function getOfferTreePropertyByTypes(array $catalog, array $parameters = []): ?array
{
$result = [];
$getCode = (isset($parameters['CODE']) && $parameters['CODE'] == 'Y');
$filter = [
'=IBLOCK_ID' => $catalog['IBLOCK_ID'],
'!=ID' => $catalog['SKU_PROPERTY_ID'],
'=ACTIVE' => 'Y',
'=MULTIPLE' => 'N',
[
'LOGIC' => 'OR',
[
'@PROPERTY_TYPE' => [
IblockPropertyTable::TYPE_ELEMENT,
IblockPropertyTable::TYPE_LIST
]
],
[
'=PROPERTY_TYPE' => IblockPropertyTable::TYPE_STRING,
'=USER_TYPE' => 'directory'
]
]
];
$iterator = IblockPropertyTable::getList([
'select' => ['ID', 'CODE', 'SORT'],
'filter' => $filter,
'order' => ['SORT' => 'ASC', 'ID' => 'ASC']
]);
while ($row = $iterator->fetch())
$result[(int)$row['ID']] = self::getPropertyCode($row, $getCode);
unset($row, $iterator);
unset($filter, $getCode);
return (!empty($result) ? array_values($result) : null);
}