• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/checklist/internals/checklist.php
  • Класс: BitrixTasksCheckListInternalsCheckList
  • Вызов: CheckList::toTreeArray
public function toTreeArray()
{
	$result = [
		'NODE_ID' => $this->getNodeId(),
		'FIELDS' => $this->getFields(),
		'ACTION' => $this->getAction(),
		'DESCENDANTS' => [],
	];

	foreach ($this->getDescendants() as $descendant)
	{
		/** @var CheckList $descendant */
		$result['DESCENDANTS'][] = $descendant->toTreeArray();
	}

	return $result;
}