diff --git a/library/Businessprocess/BpNode.php b/library/Businessprocess/BpNode.php index 5015b1d..34fd26c 100644 --- a/library/Businessprocess/BpNode.php +++ b/library/Businessprocess/BpNode.php @@ -205,16 +205,6 @@ class BpNode extends Node $this->state = $this->sortStateTostate($sort_state); } - public function countChildren() - { - return count($this->getChildren()); - } - - public function hasChildren() - { - return $this->countChildren() > 0; - } - public function setDisplay($display) { $this->display = (int) $display; diff --git a/library/Businessprocess/Node.php b/library/Businessprocess/Node.php index 163d7bb..20e68b2 100644 --- a/library/Businessprocess/Node.php +++ b/library/Businessprocess/Node.php @@ -242,21 +242,31 @@ abstract class Node return $this->bp->isEditMode(); } - public function hasChildren() + public function hasChildren($filter = null) { return false; } - public function countChildren() - { - return 0; - } - - public function getChildren() + public function getChildren($filter = null) { return array(); } + public function countChildren($filter = null) + { + return count($this->getChildren($filter)); + } + + public function hasChildren($filter = null) + { + return $this->countChildren($filter) > 0; + } + + public function isEmpty() + { + return $this->countChildren() === 0; + } + public function hasAlias() { return false;