public function setParent(INabuDataObjectTreeNode $parent)
    {
        $this->nb_tree_parent = $parent;

        if ($parent instanceof CNabuDataObject &&
            method_exists($parent, 'getId') &&
            $this instanceof CNabuDataObject &&
            method_exists($this, 'setParentId')
        ) {
            $this->setParentId($parent->getId());
        }

        return $this;
    }
public function setParent(INabuDataObjectTreeNode $parent)
    {
        $this->nb_tree_parent = $parent;

        if ($parent instanceof CNabuDataObject &&
            method_exists($parent, 'getId') &&
            $this instanceof CNabuDataObject &&
            method_exists($this, 'setParentId')
        ) {
            $this->setParentId($parent->getId());
        }

        return $this;
    }
public function setParent ( INabuDataObjectTreeNode $ parent ) { $ this -> nb_tree_parent = $ parent ; if ( $ parent instanceof CNabuDataObject && method_exists ( $ parent , 'getId' ) && $ this instanceof CNabuDataObject && method_exists ( $ this , 'setParentId' ) ) { $ this -> setParentId ( $ parent -> getId ( ) ) ; } return $ this ; }
Sets the parent instance of this tree node.
@param INabuDataObjectTreeNode $parent The parent instance.
@return INabuDataObjectTreeNode Returns $this to grant chained setters.
Sets the parent instance of this tree node .