BusinessProcess: provide a listRootNodes() method

This commit is contained in:
Thomas Gelf 2017-01-03 11:18:37 +01:00
parent 7b0b550f4f
commit a45bb7c6cb

View file

@ -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;