CRUDlex\ServiceProvider::getLocaleLabels PHP Method

getLocaleLabels() protected method

Gets a map with localized entity labels from the CRUD YML.
protected getLocaleLabels ( array $locales, array $crud ) : array
$locales array the available locales
$crud array the CRUD entity map
return array the map with localized entity labels
    protected function getLocaleLabels($locales, $crud)
    {
        $localeLabels = [];
        foreach ($locales as $locale) {
            if (array_key_exists('label_' . $locale, $crud)) {
                $localeLabels[$locale] = $crud['label_' . $locale];
            }
        }
        return $localeLabels;
    }