You are here

protected function ConfigLister::listProvidedItems in Configuration Update Manager 8

Returns a list of the install storage items for an extension.

Parameters

string $type: Type of extension ('module', etc.).

string $name: Machine name of extension.

bool $do_optional: FALSE (default) to list config/install items, TRUE to list config/optional items.

Return value

string[] List of config items provided by this extension.

2 calls to ConfigLister::listProvidedItems()
ConfigLister::listConfig in src/ConfigLister.php
Lists the config objects in active and extension storage.
ConfigListerWithProviders::listProviders in src/ConfigListerWithProviders.php
Sets up and returns the config providers list.

File

src/ConfigLister.php, line 200

Class

ConfigLister
Provides methods related to config listing.

Namespace

Drupal\config_update

Code

protected function listProvidedItems($type, $name, $do_optional = FALSE) {
  $pathname = drupal_get_filename($type, $name);
  $component = new Extension(\Drupal::root(), $type, $pathname);
  if ($do_optional) {
    $names = $this->extensionOptionalConfigStorage
      ->getComponentNames([
      $component,
    ]);
  }
  else {
    $names = $this->extensionConfigStorage
      ->getComponentNames([
      $component,
    ]);
  }
  return array_keys($names);
}