Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LocaleConfigManager.php

function LocaleConfigManager::getComponentNames

Gets configuration names associated with components.

Parameters

array $components: (optional) Array of component lists indexed by type. If not present or it is an empty array, it will update all components.

Return value

array Array of configuration object names.

1 call to LocaleConfigManager::getComponentNames()
LocaleConfigManager::updateDefaultConfigLangcodes in core/modules/locale/src/LocaleConfigManager.php
Updates default configuration when new modules or themes are installed.

File

core/modules/locale/src/LocaleConfigManager.php, line 297

Class

LocaleConfigManager
Manages configuration supported in part by interface translation.

Namespace

Drupal\locale

Code

public function getComponentNames(array $components = []) {
    $components = array_filter($components);
    if ($components) {
        $names = [];
        foreach ($components as $type => $list) {
            // InstallStorage::getComponentNames returns a list of folders keyed by
            // config name.
            $names = array_merge($names, $this->defaultConfigStorage
                ->getComponentNames($type, $list));
        }
        return $names;
    }
    else {
        return $this->defaultConfigStorage
            ->listAll();
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal