lib/Locale/LocaleProvider.php
private function loadLanguages(): iterable
    {
        if (method_exists($this->languageService, 'loadLanguageListByCode')) {
            return $this->languageService->loadLanguageListByCode($this->languageCodes);
        }

        // Deprecated: Remove when support for eZ kernel < 7.5 ends

        $languages = [];

        foreach ($this->languageCodes as $languageCode) {
            try {
                $language = $this->languageService->loadLanguage($languageCode);
            } catch (NotFoundException $e) {
                continue;
            }

            $languages[] = $language;
        }

        return $languages;
    }
private function loadLanguages(): iterable
    {
        if (method_exists($this->languageService, 'loadLanguageListByCode')) {
            return $this->languageService->loadLanguageListByCode($this->languageCodes);
        }

        // Deprecated: Remove when support for eZ kernel < 7.5 ends

        $languages = [];

        foreach ($this->languageCodes as $languageCode) {
            try {
                $language = $this->languageService->loadLanguage($languageCode);
            } catch (NotFoundException $e) {
                continue;
            }

            $languages[] = $language;
        }

        return $languages;
    }
private function loadLanguages ( ) : iterable { if ( method_exists ( $ this -> languageService , 'loadLanguageListByCode' ) ) { return $ this -> languageService -> loadLanguageListByCode ( $ this -> languageCodes ) ; } // Deprecated: Remove when support for eZ kernel < 7.5 ends $ languages = [ ] ; foreach ( $ this -> languageCodes as $ languageCode ) { try { $ language = $ this -> languageService -> loadLanguage ( $ languageCode ) ; } catch ( NotFoundException $ e ) { continue ; } $ languages [ ] = $ language ; } return $ languages ; }
Loads the list of eZ Platform languages from language codes available in the object.

@deprecated Acts as a BC layer for eZ kernel <7.5

@return \eZ\Publish\API\Repository\Values\Content\Language[]
Loads the list of eZ Platform languages from language codes available in the object .