eZ\Publish\Core\Repository\URLAliasService::choosePrioritizedLanguageCode PHP Метод

choosePrioritizedLanguageCode() защищенный Метод

Will return false if language code could nto be matched with language settings in place.
protected choosePrioritizedLanguageCode ( array $entries, boolean $showAllTranslations, string[] $prioritizedLanguageList ) : string | boolean
$entries array
$showAllTranslations boolean
$prioritizedLanguageList string[]
Результат string | boolean
    protected function choosePrioritizedLanguageCode(array $entries, $showAllTranslations, $prioritizedLanguageList)
    {
        foreach ($prioritizedLanguageList as $prioritizedLanguageCode) {
            if (isset($entries['translations'][$prioritizedLanguageCode])) {
                return $prioritizedLanguageCode;
            }
        }
        if ($entries['always-available'] || $showAllTranslations) {
            reset($entries['translations']);
            return key($entries['translations']);
        }
        return false;
    }