• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/service/user.php
  • Класс: BitrixBizprocServiceUser
  • Вызов: User::getDepartmentChain
public function getDepartmentChain(int $departmentId): array
{
	$chain = [];

	if (!$this->canUseIblockApi())
	{
		return $chain;
	}

	$departmentIblockId = $this->getDepartmentIblockId();
	$chain = CIBlockSection::getNavChain($departmentIblockId, $departmentId, ['ID'], true);

	$chain = array_map(
		static fn($value) => (int)$value['ID'],
		$chain
	);

	return array_reverse($chain);
}