concrete/src/Page/Page.php
public function setCanonicalPagePath($cPath, $isAutoGenerated = false)
    {
        $em = \ORM::entityManager();
        $path = $this->getCollectionPathObject();
        if (is_object($path)) {
            $path->setPagePath($cPath);
        } else {
            $path = new \Concrete\Core\Entity\Page\PagePath();
            $path->setPagePath($cPath);
            $path->setPageObject($this);
        }
        $path->setPagePathIsAutoGenerated($isAutoGenerated);
        $path->setPagePathIsCanonical(true);
        $em->persist($path);
        $em->flush();
    }
public function setCanonicalPagePath($cPath, $isAutoGenerated = false)
    {
        $em = \ORM::entityManager();
        $path = $this->getCollectionPathObject();
        if (is_object($path)) {
            $path->setPagePath($cPath);
        } else {
            $path = new \Concrete\Core\Entity\Page\PagePath();
            $path->setPagePath($cPath);
            $path->setPageObject($this);
        }
        $path->setPagePathIsAutoGenerated($isAutoGenerated);
        $path->setPagePathIsCanonical(true);
        $em->persist($path);
        $em->flush();
    }
public function setCanonicalPagePath ( $ cPath , $ isAutoGenerated = false ) { $ em = \ ORM :: entityManager ( ) ; $ path = $ this -> getCollectionPathObject ( ) ; if ( is_object ( $ path ) ) { $ path -> setPagePath ( $ cPath ) ; } else { $ path = new \ Concrete \ Core \ Entity \ Page \ PagePath ( ) ; $ path -> setPagePath ( $ cPath ) ; $ path -> setPageObject ( $ this ) ; } $ path -> setPagePathIsAutoGenerated ( $ isAutoGenerated ) ; $ path -> setPagePathIsCanonical ( true ) ; $ em -> persist ( $ path ) ; $ em -> flush ( ) ; }
Set the canonical page path for a page.

@param string $cPath
@param bool $isAutoGenerated is the page path generated from URL slugs?
Set the canonical page path for a page .