mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-04 01:09:25 -05:00
BusinessProcess: provide createImportedNode helper
This commit is contained in:
parent
7d82bb05bd
commit
f16715814f
1 changed files with 13 additions and 3 deletions
|
|
@ -491,10 +491,20 @@ class BusinessProcess
|
|||
return $node;
|
||||
}
|
||||
|
||||
public function createImportedNode($config, $name)
|
||||
public function createMissingBp($name)
|
||||
{
|
||||
$node = new ImportedNode($this, (object) array('name' => $name, 'configName' => $config));
|
||||
$this->nodes[$name] = $node;
|
||||
return $this->createBp($name)->setMissing();
|
||||
}
|
||||
|
||||
public function createImportedNode($config, $name = null)
|
||||
{
|
||||
$params = (object) array('configName' => $config);
|
||||
if ($name !== null) {
|
||||
$params->node = $name;
|
||||
}
|
||||
|
||||
$node = new ImportedNode($this, $params);
|
||||
$this->nodes[$node->getName()] = $node;
|
||||
return $node;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue