code/database/behavior/recursable.php
public function hasChildren()
    {
        $result = false;

        if(isset($this->__children[$this->id])) {
            $result = (boolean) count($this->__children[$this->id]);
        }

        return $result;
    }
public function hasChildren()
    {
        $result = false;

        if(isset($this->__children[$this->id])) {
            $result = (boolean) count($this->__children[$this->id]);
        }

        return $result;
    }
public function hasChildren ( ) { $ result = false ; if ( isset ( $ this -> __children [ $ this -> id ] ) ) { $ result = ( boolean ) count ( $ this -> __children [ $ this -> id ] ) ; } return $ result ; }
Check if the node has children

@return bool True if the node has one or more children
Check if the node has children