getParentNodeIdentifier() 공개 메소드

Get the parent identifier for the node
예제 #1
0
 /**
  * Adds a node to this node
  *
  * @param NodeInterface $node nodes
  *
  * @return $this
  */
 public function add(NodeInterface $node)
 {
     $this->rawNodes[$node->getNodeIdentifier()] = $node;
     $parentId = $node->getParentNodeIdentifier();
     if ($parentId) {
         $parent = $this->rawNodes[$parentId];
         $parent->addChild($node);
         $parent->setChildren($this->sort($parent->getChildren()));
         $node->setParent($this->rawNodes[$parentId]);
     } else {
         $this->treeNodes[$node->getNodeIdentifier()] = $node;
     }
     return $this;
 }