From a45bb7c6cb943e5022b2936057ae922a2201600e Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Tue, 3 Jan 2017 11:18:37 +0100 Subject: [PATCH] BusinessProcess: provide a listRootNodes() method --- library/Businessprocess/BusinessProcess.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/library/Businessprocess/BusinessProcess.php b/library/Businessprocess/BusinessProcess.php index 99f7b5e..c411dec 100644 --- a/library/Businessprocess/BusinessProcess.php +++ b/library/Businessprocess/BusinessProcess.php @@ -4,6 +4,7 @@ namespace Icinga\Module\Businessprocess; use Icinga\Application\Benchmark; use Icinga\Exception\IcingaException; +use Icinga\Exception\NotFoundError; use Icinga\Exception\ProgrammingError; use Icinga\Module\Businessprocess\Exception\NestingError; use Icinga\Module\Businessprocess\Modification\ProcessChanges; @@ -431,6 +432,13 @@ class BusinessProcess return $this->root_nodes; } + public function listRootNodes() + { + $names = array_keys($this->root_nodes); + sort($names); + return $names; + } + public function getNodes() { return $this->nodes;