concrete/src/Page/Page.php
public function rescanCollectionPath()
    {
        //if ($this->cParentID > 0) {
            $newPath = $this->generatePagePath();

            $pathObject = $this->getCollectionPathObject();
            $ppIsAutoGenerated = true;
            if (is_object($pathObject) && !$pathObject->isPagePathAutoGenerated()) {
                $ppIsAutoGenerated = false;
            }
            $this->setCanonicalPagePath($newPath, $ppIsAutoGenerated);
            $this->rescanSystemPageStatus();
            $this->cPath = $newPath;
            $this->refreshCache();

            $children = $this->getCollectionChildren();
            if (count($children) > 0) {
                $myCollectionID = $this->getCollectionID();
                foreach ($children as $child) {
                    // Let's avoid recursion caused by potentially malformed data
                    if ($child->getCollectionID() !== $myCollectionID) {
                        $child->rescanCollectionPath();
                    }
                }
            }
        //}
    }
public function rescanCollectionPath()
    {
        //if ($this->cParentID > 0) {
            $newPath = $this->generatePagePath();

            $pathObject = $this->getCollectionPathObject();
            $ppIsAutoGenerated = true;
            if (is_object($pathObject) && !$pathObject->isPagePathAutoGenerated()) {
                $ppIsAutoGenerated = false;
            }
            $this->setCanonicalPagePath($newPath, $ppIsAutoGenerated);
            $this->rescanSystemPageStatus();
            $this->cPath = $newPath;
            $this->refreshCache();

            $children = $this->getCollectionChildren();
            if (count($children) > 0) {
                $myCollectionID = $this->getCollectionID();
                foreach ($children as $child) {
                    // Let's avoid recursion caused by potentially malformed data
                    if ($child->getCollectionID() !== $myCollectionID) {
                        $child->rescanCollectionPath();
                    }
                }
            }
        //}
    }
public function rescanCollectionPath ( ) { //if ($this->cParentID > 0) { $ newPath = $ this -> generatePagePath ( ) ; $ pathObject = $ this -> getCollectionPathObject ( ) ; $ ppIsAutoGenerated = true ; if ( is_object ( $ pathObject ) && ! $ pathObject -> isPagePathAutoGenerated ( ) ) { $ ppIsAutoGenerated = false ; } $ this -> setCanonicalPagePath ( $ newPath , $ ppIsAutoGenerated ) ; $ this -> rescanSystemPageStatus ( ) ; $ this -> cPath = $ newPath ; $ this -> refreshCache ( ) ; $ children = $ this -> getCollectionChildren ( ) ; if ( count ( $ children ) > 0 ) { $ myCollectionID = $ this -> getCollectionID ( ) ; foreach ( $ children as $ child ) { // Let's avoid recursion caused by potentially malformed data if ( $ child -> getCollectionID ( ) !== $ myCollectionID ) { $ child -> rescanCollectionPath ( ) ; } } } //} }
Recalculate the canonical page path for the current page and its sub-pages, based on its current version, URL slug, etc.
Recalculate the canonical page path for the current page and its sub - pages based on its current version URL slug etc .