mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-09 22:13:05 -05:00
Node: provide generic helpers
This commit is contained in:
parent
1220fc4ae5
commit
675b74ada9
2 changed files with 17 additions and 17 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue