resolveParentLanguages example

public function reset(): void
    {
        $this->languages = [];
    }

    /** * @return LanguageData */
    private function getLanguages(): array
    {
        if (\count($this->languages) === 0) {
            $this->languages = $this->resolveParentLanguages(
                $this->languageLoader->loadLanguages()
            );
        }

        return $this->languages;
    }

    /** * resolves the inherited languages codes, so we have a guaranteed language code for each language id * we can't do it in the language loader as other places (e.g. DAL writes) expect that the translation code is unique * * @param LanguageData $languages * * @return LanguageData */
Home | Imprint | This part of the site doesn't use cookies.