Helper/SiteAccess.php
private function getMainLanguagesBySiteAccesses(array $siteAccesses)
    {
        $languages = array();

        foreach ($siteAccesses as $siteAccess) {
            $languageList = $this->configResolver->getParameter(
                'languages',
                '',
                $siteAccess !== 'default' ? $siteAccess : null
            );
            $mainLanguage = reset($languageList);

            if ($mainLanguage) {
                $languages[$mainLanguage] = $mainLanguage;
            }
        }

        return array_keys($languages);
    }
private function getMainLanguagesBySiteAccesses(array $siteAccesses)
    {
        $languages = array();

        foreach ($siteAccesses as $siteAccess) {
            $languageList = $this->configResolver->getParameter(
                'languages',
                '',
                $siteAccess !== 'default' ? $siteAccess : null
            );
            $mainLanguage = reset($languageList);

            if ($mainLanguage) {
                $languages[$mainLanguage] = $mainLanguage;
            }
        }

        return array_keys($languages);
    }
private function getMainLanguagesBySiteAccesses ( array $ siteAccesses ) { $ languages = array ( ) ; foreach ( $ siteAccesses as $ siteAccess ) { $ languageList = $ this -> configResolver -> getParameter ( 'languages' , '' , $ siteAccess !== 'default' ? $ siteAccess : null ) ; $ mainLanguage = reset ( $ languageList ) ; if ( $ mainLanguage ) { $ languages [ $ mainLanguage ] = $ mainLanguage ; } } return array_keys ( $ languages ) ; }
Returns main languages from siteAccess list.

@param array $siteAccesses

@return array
Returns main languages from siteAccess list .