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

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

Is this a child node (not root)?
public isChild ( ) : boolean
Результат boolean
    public function isChild()
    {
        return !$this->isRoot();
    }

Usage Example

Пример #1
0
 /**
  * Returns true if both this node and $otherNode are root, leaf or child (same tree scope)
  *
  * @param TreeModel $otherNode
  *
  * @return bool
  */
 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;
     }
 }