public function getAbsoluteLiveLink($includeStageEqualsLive = true)
    {
        $oldReadingMode = Versioned::get_reading_mode();
        Versioned::set_stage(Versioned::LIVE);
        /** @var SiteTree $live */
        $live = Versioned::get_one_by_stage(self::class, Versioned::LIVE, array(
            '"SiteTree"."ID"' => $this->ID
        ));
        if ($live) {
            $link = $live->AbsoluteLink();
            if ($includeStageEqualsLive) {
                $link = Controller::join_links($link, '?stage=Live');
            }
        } else {
            $link = null;
        }

        Versioned::set_reading_mode($oldReadingMode);
        return $link;
    }
public function getAbsoluteLiveLink($includeStageEqualsLive = true)
    {
        $oldReadingMode = Versioned::get_reading_mode();
        Versioned::set_stage(Versioned::LIVE);
        /** @var SiteTree $live */
        $live = Versioned::get_one_by_stage(self::class, Versioned::LIVE, array(
            '"SiteTree"."ID"' => $this->ID
        ));
        if ($live) {
            $link = $live->AbsoluteLink();
            if ($includeStageEqualsLive) {
                $link = Controller::join_links($link, '?stage=Live');
            }
        } else {
            $link = null;
        }

        Versioned::set_reading_mode($oldReadingMode);
        return $link;
    }
public function getAbsoluteLiveLink ( $ includeStageEqualsLive = true ) { $ oldReadingMode = Versioned :: get_reading_mode ( ) ; Versioned :: set_stage ( Versioned :: LIVE ) ; /** @var SiteTree $live */ $ live = Versioned :: get_one_by_stage ( self :: class , Versioned :: LIVE , array ( '"SiteTree"."ID"' => $ this -> ID ) ) ; if ( $ live ) { $ link = $ live -> AbsoluteLink ( ) ; if ( $ includeStageEqualsLive ) { $ link = Controller :: join_links ( $ link , '?stage=Live' ) ; } } else { $ link = null ; } Versioned :: set_reading_mode ( $ oldReadingMode ) ; return $ link ; }
Get the absolute URL for this page on the Live site.

@param bool $includeStageEqualsLive Whether to append the URL with ?stage=Live to force Live mode
@return string
Get the absolute URL for this page on the Live site .