PMA\libraries\navigation\nodes\Node::hasChildren PHP 메소드

hasChildren() 공개 메소드

This function checks if the node has children nodes associated with it
public hasChildren ( boolean $count_empty_containers = true ) : boolean
$count_empty_containers boolean Whether to count empty child containers as valid children
리턴 boolean Whether the node has child nodes
    public function hasChildren($count_empty_containers = true)
    {
        $retval = false;
        if ($count_empty_containers) {
            if (count($this->children)) {
                $retval = true;
            }
        } else {
            foreach ($this->children as $child) {
                if ($child->type == Node::OBJECT || $child->hasChildren(false)) {
                    $retval = true;
                    break;
                }
            }
        }
        return $retval;
    }