src/Model/Domain.php
public function DefaultLocale()
    {
        // Return explicit default locale
        if ($this->DefaultLocaleID) {
            $locale = Locale::getCached()->byID($this->DefaultLocaleID);
            if ($locale) {
                return $locale;
            }
        }

        // Use IsGlobalDefault if this is a member of this locale, or the first in the list of children
        $locales = Locale::getCached()->filter('DomainID', $this->ID);
        return $locales->filter('IsGlobalDefault', 1)->first()
            ?: $locales->first();
    }
public function DefaultLocale()
    {
        // Return explicit default locale
        if ($this->DefaultLocaleID) {
            $locale = Locale::getCached()->byID($this->DefaultLocaleID);
            if ($locale) {
                return $locale;
            }
        }

        // Use IsGlobalDefault if this is a member of this locale, or the first in the list of children
        $locales = Locale::getCached()->filter('DomainID', $this->ID);
        return $locales->filter('IsGlobalDefault', 1)->first()
            ?: $locales->first();
    }
public function DefaultLocale ( ) { // Return explicit default locale if ( $ this -> DefaultLocaleID ) { $ locale = Locale :: getCached ( ) -> byID ( $ this -> DefaultLocaleID ) ; if ( $ locale ) { return $ locale ; } } // Use IsGlobalDefault if this is a member of this locale, or the first in the list of children $ locales = Locale :: getCached ( ) -> filter ( 'DomainID' , $ this -> ID ) ; return $ locales -> filter ( 'IsGlobalDefault' , 1 ) -> first ( ) ? : $ locales -> first ( ) ; }
Get default locale for this domain

@return Locale
Get default locale for this domain