src/Sulu/Component/Webspace/Loader/XmlFileLoader10.php
protected function loadPortalLocalizationDefaultFromWebspace($portal)
    {
        $webspaceDefaultLocalization = $this->webspace->getDefaultLocalization();

        foreach ($portal->getLocalizations() as $localization) {
            if ($webspaceDefaultLocalization
                && $webspaceDefaultLocalization->getLocale() == $localization->getLocale()
            ) {
                $localization->setDefault(true);
                $portal->setDefaultLocalization($localization);

                return true;
            }
        }

        return false;
    }
protected function loadPortalLocalizationDefaultFromWebspace($portal)
    {
        $webspaceDefaultLocalization = $this->webspace->getDefaultLocalization();

        foreach ($portal->getLocalizations() as $localization) {
            if ($webspaceDefaultLocalization
                && $webspaceDefaultLocalization->getLocale() == $localization->getLocale()
            ) {
                $localization->setDefault(true);
                $portal->setDefaultLocalization($localization);

                return true;
            }
        }

        return false;
    }
protected function loadPortalLocalizationDefaultFromWebspace ( $ portal ) { $ webspaceDefaultLocalization = $ this -> webspace -> getDefaultLocalization ( ) ; foreach ( $ portal -> getLocalizations ( ) as $ localization ) { if ( $ webspaceDefaultLocalization && $ webspaceDefaultLocalization -> getLocale ( ) == $ localization -> getLocale ( ) ) { $ localization -> setDefault ( true ) ; $ portal -> setDefaultLocalization ( $ localization ) ; return true ; } } return false ; }
Sets the default localization for the given portal.

@param $portal Portal

@return bool True when successful, otherwise false
Sets the default localization for the given portal .