/**
  * Get all configuration names and folders for a list of modules or themes.
  *
  * @param string $type
  *   Type of components: 'module' | 'theme' | 'profile'
  * @param array $list
  *   Array of theme or module names.
  *
  * @return 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.
  */
 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;
 }
 /**
  * Get all configuration names and folders for a list of modules or themes.
  *
  * @param string $type
  *   Type of components: 'module' | 'theme' | 'profile'
  * @param array $list
  *   Array of theme or module names.
  *
  * @return 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.
  */
 protected function installStorageComponents($type, array $list)
 {
     $names = array_keys($this->installStorage->getComponentNames($type, $list));
     if ($type == 'module' && in_array('language', $list)) {
         $languages = $this->predefinedConfiguredLanguages();
         $names = array_unique(array_merge($names, $languages));
     }
     return $names;
 }
 /**
  * {@inheritdoc}
  */
 public function listExtensionConfig($extension)
 {
     // Convert to Component object if it is a string
     if (is_string($extension)) {
         $pathname = drupal_get_filename('module', $extension);
         $extension = new Extension(\Drupal::root(), 'module', $pathname);
     }
     return array_keys($this->extensionStorage->getComponentNames([$this->getExtensionName($extension) => $extension]));
 }
 /**
  * Gets configuration names associated with components.
  *
  * @param 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 array
  *   Array of configuration object names.
  */
 public function getComponentNames(array $components)
 {
     $components = array_filter($components);
     if ($components) {
         $names = array();
         foreach ($components as $type => $list) {
             // InstallStorage::getComponentNames returns a list of folders keyed by
             // config name.
             $names = array_merge($names, array_keys($this->installStorage->getComponentNames($type, $list)));
         }
         return $names;
     } else {
         return $this->installStorage->listAll();
     }
 }