concrete/src/Page/Page.php
protected function computeCanonicalPagePath()
    {
        $parent = self::getByID($this->cParentID);
        $parentPath = $parent->getCollectionPathObject();
        $path = '';
        if ($parentPath instanceof PagePath) {
            $path = $parentPath->getPagePath();
        }
        $path .= '/';
        $cID = ($this->getCollectionPointerOriginalID() > 0) ? $this->getCollectionPointerOriginalID() : $this->cID;
        /** @var \Concrete\Core\Utility\Service\Validation\Strings $stringValidator */
        $stringValidator = Core::make('helper/validation/strings');
        if ($stringValidator->notempty($this->getCollectionHandle())) {
            $path .= $this->getCollectionHandle();
        } else if (!$this->isHomePage()) {
            $path .= $cID;
        } else {
            $path = ''; // This is computing the path for the home page, which has no handle, and so shouldn't have a segment.
        }

        $event = new PagePathEvent($this);
        $event->setPagePath($path);
        $event = Events::dispatch('on_compute_canonical_page_path', $event);

        return $event->getPagePath();
    }
protected function computeCanonicalPagePath()
    {
        $parent = self::getByID($this->cParentID);
        $parentPath = $parent->getCollectionPathObject();
        $path = '';
        if ($parentPath instanceof PagePath) {
            $path = $parentPath->getPagePath();
        }
        $path .= '/';
        $cID = ($this->getCollectionPointerOriginalID() > 0) ? $this->getCollectionPointerOriginalID() : $this->cID;
        /** @var \Concrete\Core\Utility\Service\Validation\Strings $stringValidator */
        $stringValidator = Core::make('helper/validation/strings');
        if ($stringValidator->notempty($this->getCollectionHandle())) {
            $path .= $this->getCollectionHandle();
        } else if (!$this->isHomePage()) {
            $path .= $cID;
        } else {
            $path = ''; // This is computing the path for the home page, which has no handle, and so shouldn't have a segment.
        }

        $event = new PagePathEvent($this);
        $event->setPagePath($path);
        $event = Events::dispatch('on_compute_canonical_page_path', $event);

        return $event->getPagePath();
    }
protected function computeCanonicalPagePath ( ) { $ parent = self :: getByID ( $ this -> cParentID ) ; $ parentPath = $ parent -> getCollectionPathObject ( ) ; $ path = '' ; if ( $ parentPath instanceof PagePath ) { $ path = $ parentPath -> getPagePath ( ) ; } $ path .= '/' ; $ cID = ( $ this -> getCollectionPointerOriginalID ( ) > 0 ) ? $ this -> getCollectionPointerOriginalID ( ) : $ this -> cID ; /** @var \Concrete\Core\Utility\Service\Validation\Strings $stringValidator */ $ stringValidator = Core :: make ( 'helper/validation/strings' ) ; if ( $ stringValidator -> notempty ( $ this -> getCollectionHandle ( ) ) ) { $ path .= $ this -> getCollectionHandle ( ) ; } else if ( ! $ this -> isHomePage ( ) ) { $ path .= $ cID ; } else { $ path = '' ; // This is computing the path for the home page, which has no handle, and so shouldn't have a segment. } $ event = new PagePathEvent ( $ this ) ; $ event -> setPagePath ( $ path ) ; $ event = Events :: dispatch ( 'on_compute_canonical_page_path' , $ event ) ; return $ event -> getPagePath ( ) ; }
Get the canonical path string of this page .
This happens before any uniqueness checks get run.

@return string
Get the canonical path string of this page . This happens before any uniqueness checks get run .