concrete/src/Page/Page.php
public function duplicateAll($nc = null, $preserveUserID = false, Site $site = null)
    {
        $nc2 = $this->duplicate($nc, $preserveUserID, $site);
        self::_duplicateAll($this, $nc2, $preserveUserID, $site);

        return $nc2;
    }
public function duplicateAll($nc = null, $preserveUserID = false, Site $site = null)
    {
        $nc2 = $this->duplicate($nc, $preserveUserID, $site);
        self::_duplicateAll($this, $nc2, $preserveUserID, $site);

        return $nc2;
    }
public function duplicateAll ( $ nc = null , $ preserveUserID = false , Site $ site = null ) { $ nc2 = $ this -> duplicate ( $ nc , $ preserveUserID , $ site ) ; self :: _duplicateAll ( $ this , $ nc2 , $ preserveUserID , $ site ) ; return $ nc2 ; }
Duplicate this page and all its child pages and return the new Page created.

@param \Concrete\Core\Page\Page|null $toParentPage The page under which this page should be copied to
@param bool $preserveUserID Set to true to preserve the original page author IDs
@param \Concrete\Core\Entity\Site\Site|null $site the destination site (used if $toParentPage is NULL)

@return \Concrete\Core\Page\Page
Duplicate this page and all its child pages and return the new Page created .