public function augmentValidURLSegment()
    {
        // If this page is being filtered in the current subsite, then no custom validation query is required.
        $subsite = Subsite::$force_subsite ?: SubsiteState::singleton()->getSubsiteId();
        if (empty($this->owner->SubsiteID) || $subsite == $this->owner->SubsiteID) {
            return null;
        }

        // Backup forced subsite
        $prevForceSubsite = Subsite::$force_subsite;
        Subsite::$force_subsite = $this->owner->SubsiteID;

        // Repeat validation in the correct subsite
        $isValid = $this->owner->validURLSegment();

        // Restore
        Subsite::$force_subsite = $prevForceSubsite;

        return (bool)$isValid;
    }
public function augmentValidURLSegment()
    {
        // If this page is being filtered in the current subsite, then no custom validation query is required.
        $subsite = Subsite::$force_subsite ?: SubsiteState::singleton()->getSubsiteId();
        if (empty($this->owner->SubsiteID) || $subsite == $this->owner->SubsiteID) {
            return null;
        }

        // Backup forced subsite
        $prevForceSubsite = Subsite::$force_subsite;
        Subsite::$force_subsite = $this->owner->SubsiteID;

        // Repeat validation in the correct subsite
        $isValid = $this->owner->validURLSegment();

        // Restore
        Subsite::$force_subsite = $prevForceSubsite;

        return (bool)$isValid;
    }
public function augmentValidURLSegment ( ) { // If this page is being filtered in the current subsite, then no custom validation query is required. $ subsite = Subsite :: $ force_subsite ? : SubsiteState :: singleton ( ) -> getSubsiteId ( ) ; if ( empty ( $ this -> owner -> SubsiteID ) || $ subsite == $ this -> owner -> SubsiteID ) { return null ; } // Backup forced subsite $ prevForceSubsite = Subsite :: $ force_subsite ; Subsite :: $ force_subsite = $ this -> owner -> SubsiteID ; // Repeat validation in the correct subsite $ isValid = $ this -> owner -> validURLSegment ( ) ; // Restore Subsite :: $ force_subsite = $ prevForceSubsite ; return ( bool ) $ isValid ; }
Ensure that valid url segments are checked within the correct subsite of the owner object,
even if the current subsiteID is set to some other subsite.

@return null|bool Either true or false, or null to not influence result
Ensure that valid url segments are checked within the correct subsite of the owner object even if the current subsiteID is set to some other subsite .