public function duplicateAsChild($id)
    {
        /** @var SiteTree $newSiteTree */
        $newSiteTree = $this->duplicate();
        $newSiteTree->ParentID = $id;
        $newSiteTree->Sort = 0;
        $newSiteTree->write();
    }
public function duplicateAsChild($id)
    {
        /** @var SiteTree $newSiteTree */
        $newSiteTree = $this->duplicate();
        $newSiteTree->ParentID = $id;
        $newSiteTree->Sort = 0;
        $newSiteTree->write();
    }
public function duplicateAsChild ( $ id ) { /** @var SiteTree $newSiteTree */ $ newSiteTree = $ this -> duplicate ( ) ; $ newSiteTree -> ParentID = $ id ; $ newSiteTree -> Sort = 0 ; $ newSiteTree -> write ( ) ; }
Duplicate this node and its children as a child of the node with the given ID

@param int $id ID of the new node's new parent
Duplicate this node and its children as a child of the node with the given ID