- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_product_helper.php
- Класс: \CCrmProductHelper
- Вызов: CCrmProductHelper::PrepareSectionListItems
static function PrepareSectionListItems($catalogID, $addNotSelected = true)
{
IncludeModuleLangFile(__FILE__);
$result = array();
if ($addNotSelected)
{
$result['0'] = GetMessage('CRM_PRODUCT_SECTION_NOT_SELECTED');
}
$rs = CIBlockSection::GetList(
array('left_margin' => 'asc'),
array(
'IBLOCK_ID' => $catalogID,
/*'GLOBAL_ACTIVE' => 'Y',*/
'CHECK_PERMISSIONS' => 'N'
),
false,
array(
'ID',
'NAME',
'DEPTH_LEVEL'
)
);
while ($ary = $rs->GetNext())
{
$result[$ary['ID']] = str_repeat(' . ', $ary['DEPTH_LEVEL']).$ary['~NAME'];
}
return $result;
}