FOF30\Model\TreeModel::inSameScope PHP Метод

inSameScope() публичный Метод

Returns true if both this node and $otherNode are root, leaf or child (same tree scope)
public inSameScope ( TreeModel $otherNode ) : boolean
$otherNode TreeModel
Результат boolean
    public function inSameScope(TreeModel $otherNode)
    {
        if ($this->isLeaf()) {
            return $otherNode->isLeaf();
        } elseif ($this->isRoot()) {
            return $otherNode->isRoot();
        } elseif ($this->isChild()) {
            return $otherNode->isChild();
        } else {
            return false;
        }
    }