LocaleDefaultConfigStorage::getComponentNames

public LocaleDefaultConfigStorage::getComponentNames($type, array $list)

Get all configuration names and folders for a list of modules or themes.

Parameters

string $type: Type of components: 'module' | 'theme' | 'profile'

array $list: Array of theme or module names.

Return value

array Configuration names provided by that component. In case of language module this list is extended with configured languages that have predefined names as well.

File

core/modules/locale/src/LocaleDefaultConfigStorage.php, line 127

Class

LocaleDefaultConfigStorage
Provides access to default configuration for locale integration.

Namespace

Drupal\locale

Code

public function getComponentNames($type, array $list) {
  $names = array_unique(
  array_merge(
  array_keys($this->requiredInstallStorage->getComponentNames($type, $list)), 
  array_keys($this->optionalInstallStorage->getComponentNames($type, $list))
  )
  );
  if ($type == 'module' && in_array('language', $list)) {
    $languages = $this->predefinedConfiguredLanguages();
    $names = array_unique(array_merge($names, $languages));
  }
  return $names;
}
doc_Drupal
2016-10-29 09:24:01
Comments
Leave a Comment

Please login to continue.