BpNode: show full process missing if childs are so

This commit is contained in:
Thomas Gelf 2015-03-03 11:00:15 +01:00
parent 6cfba947d6
commit 19ab1a28cc

View file

@ -16,6 +16,7 @@ class BpNode extends Node
protected $child_names = array();
protected $alias;
protected $counters;
protected $missing = null;
public function __construct(
BusinessProcess $bp,
@ -52,6 +53,20 @@ class BpNode extends Node
return $this->counters;
}
public function isMissing()
{
if ($this->missing === null) {
$exists = false;
foreach ($this->getChildren() as $child) {
if (! $child->isMissing()) {
$exists = true;
}
}
$this->missing = ! $exists;
}
return $this->missing;
}
public function getOperator()
{
return $this->operator;