src/Extension/FluentSiteTreeExtension.php
public function updateLink(&$link, &$action, &$relativeLink)
    {
        // Get appropriate locale for this record
        $localeObj = $this->getRecordLocale();
        if (!$localeObj) {
            return;
        }

        // Don't rewrite outside of domain mode
        $domain = $localeObj->getDomain();
        if (!$domain) {
            return;
        }

        // Don't need to prepend domain if on the same domain
        if (FluentState::singleton()->getDomain() === $domain->Domain) {
            return;
        }

        // Prefix with domain
        $link = Controller::join_links($domain->Link(), $link);
    }
public function updateLink(&$link, &$action, &$relativeLink)
    {
        // Get appropriate locale for this record
        $localeObj = $this->getRecordLocale();
        if (!$localeObj) {
            return;
        }

        // Don't rewrite outside of domain mode
        $domain = $localeObj->getDomain();
        if (!$domain) {
            return;
        }

        // Don't need to prepend domain if on the same domain
        if (FluentState::singleton()->getDomain() === $domain->Domain) {
            return;
        }

        // Prefix with domain
        $link = Controller::join_links($domain->Link(), $link);
    }
public function updateLink ( & $ link , & $ action , & $ relativeLink ) { // Get appropriate locale for this record $ localeObj = $ this -> getRecordLocale ( ) ; if ( ! $ localeObj ) { return ; } // Don't rewrite outside of domain mode $ domain = $ localeObj -> getDomain ( ) ; if ( ! $ domain ) { return ; } // Don't need to prepend domain if on the same domain if ( FluentState :: singleton ( ) -> getDomain ( ) === $ domain -> Domain ) { return ; } // Prefix with domain $ link = Controller :: join_links ( $ domain -> Link ( ) , $ link ) ; }
Update link to include hostname if in domain mode

@param string $link root-relative url (includes baseurl)
@param string $action
@param string $relativeLink
Update link to include hostname if in domain mode