concrete/src/Page/Page.php
public function duplicate($nc = null, $preserveUserID = false, TreeInterface $site = null)
    {
        $app = Application::getFacadeApplication();
        $cloner = $app->make(Cloner::class);
        $clonerOptions = $app->build(ClonerOptions::class)
            ->setKeepOriginalAuthor($preserveUserID)
        ;

        return $cloner->clonePage($this, $clonerOptions, $nc ? $nc : null, $site);
    }
public function duplicate($nc = null, $preserveUserID = false, TreeInterface $site = null)
    {
        $app = Application::getFacadeApplication();
        $cloner = $app->make(Cloner::class);
        $clonerOptions = $app->build(ClonerOptions::class)
            ->setKeepOriginalAuthor($preserveUserID)
        ;

        return $cloner->clonePage($this, $clonerOptions, $nc ? $nc : null, $site);
    }
public function duplicate ( $ nc = null , $ preserveUserID = false , TreeInterface $ site = null ) { $ app = Application :: getFacadeApplication ( ) ; $ cloner = $ app -> make ( Cloner :: class ) ; $ clonerOptions = $ app -> build ( ClonerOptions :: class ) -> setKeepOriginalAuthor ( $ preserveUserID ) ; return $ cloner -> clonePage ( $ this , $ clonerOptions , $ nc ? $ nc : null , $ site ) ; }
Duplicate this page 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\Site\Tree\TreeInterface|null $site the destination site (used if $toParentPage is NULL)

@return \Concrete\Core\Page\Page
Duplicate this page and return the new Page created .