src/Model/Locale.php
public function getBaseURL()
    {
        $base = Director::baseURL();

        // Prepend hostname for domain mode
        $domain = $this->getDomain();
        if ($domain) {
            $base = Controller::join_links($domain->Link(), $base);
        }

        // Determine if base suffix should be appended
        $append = true;
        if ($this->getIsDefault()) {
            // Apply config
            $append = !(bool) Config::inst()->get(FluentDirectorExtension::class, 'disable_default_prefix');
        }

        if ($append) {
            // Append locale url segment
            $base = Controller::join_links($base, $this->getURLSegment(), '/');
        }

        return $base;
    }
public function getBaseURL()
    {
        $base = Director::baseURL();

        // Prepend hostname for domain mode
        $domain = $this->getDomain();
        if ($domain) {
            $base = Controller::join_links($domain->Link(), $base);
        }

        // Determine if base suffix should be appended
        $append = true;
        if ($this->getIsDefault()) {
            // Apply config
            $append = !(bool) Config::inst()->get(FluentDirectorExtension::class, 'disable_default_prefix');
        }

        if ($append) {
            // Append locale url segment
            $base = Controller::join_links($base, $this->getURLSegment(), '/');
        }

        return $base;
    }
public function getBaseURL ( ) { $ base = Director :: baseURL ( ) ; // Prepend hostname for domain mode $ domain = $ this -> getDomain ( ) ; if ( $ domain ) { $ base = Controller :: join_links ( $ domain -> Link ( ) , $ base ) ; } // Determine if base suffix should be appended $ append = true ; if ( $ this -> getIsDefault ( ) ) { // Apply config $ append = ! ( bool ) Config :: inst ( ) -> get ( FluentDirectorExtension :: class , 'disable_default_prefix' ) ; } if ( $ append ) { // Append locale url segment $ base = Controller :: join_links ( $ base , $ this -> getURLSegment ( ) , '/' ) ; } return $ base ; }
Determine the base URL within the current locale

@return string
Determine the base URL within the current locale