- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/lib/grid/panel/groupaction.php
- Класс: BitrixIblockGridPanelGroupAction
- Вызов: GroupAction::loadSections
protected function loadSections(): void
{
if ($this->sections === null)
{
$this->sections = [];
if ($this->iblockId > 0)
{
$iterator = CIBlockSection::getTreeList(
['IBLOCK_ID' => $this->iblockId],
['ID', 'NAME', 'DEPTH_LEVEL', 'LEFT_MARGIN']
);
while ($row = $iterator->Fetch())
{
$this->sections[] = [
'NAME' => str_repeat(' . ', $row['DEPTH_LEVEL']).$row['NAME'],
'VALUE' => $row['ID']
];
}
unset($row, $iterator);
}
}
}