public function onBeforeDuplicate()
    {
        $subsiteId = SubsiteState::singleton()->getSubsiteId();
        if ($subsiteId !== null) {
            $this->owner->SubsiteID = $subsiteId;
        }
    }
public function onBeforeDuplicate()
    {
        $subsiteId = SubsiteState::singleton()->getSubsiteId();
        if ($subsiteId !== null) {
            $this->owner->SubsiteID = $subsiteId;
        }
    }
public function onBeforeDuplicate ( ) { $ subsiteId = SubsiteState :: singleton ( ) -> getSubsiteId ( ) ; if ( $ subsiteId !== null ) { $ this -> owner -> SubsiteID = $ subsiteId ; } }
When duplicating a page, assign the current subsite ID from the state
When duplicating a page assign the current subsite ID from the state