protected function ConfigProviderBase::listConfig in Configuration Provider 8
Same name and namespace in other branches
- 8.2 src/Plugin/ConfigProviderBase.php \Drupal\config_provider\Plugin\ConfigProviderBase::listConfig()
Returns a list of all configuration items or those of extensions.
Parameters
\Drupal\Core\Config\StorageInterface $storage: A configuration storage.
\Drupal\Core\Extension\Extension[] $extensions: An associative array of Extension objects, keyed by extension name.
Return value
array An array containing configuration object names.
2 calls to ConfigProviderBase::listConfig()
- ConfigProviderInstall::addInstallableConfig in src/
Plugin/ ConfigProvider/ ConfigProviderInstall.php - Adds configuration that is available to be installed or updated.
- ConfigProviderOptional::addInstallableConfig in src/
Plugin/ ConfigProvider/ ConfigProviderOptional.php - Adds configuration that is available to be installed or updated.
File
- src/
Plugin/ ConfigProviderBase.php, line 189
Class
- ConfigProviderBase
- Base class for Configuration provider plugins.
Namespace
Drupal\config_provider\PluginCode
protected function listConfig(StorageInterface $storage, array $extensions = []) {
if (!empty($extensions)) {
$config_names = [];
/* @var \Drupal\Core\Extension\Extension $extension */
foreach ($extensions as $name => $extension) {
$config_names = array_merge($config_names, array_keys($storage
->getComponentNames([
$name => $extension,
])));
}
}
else {
$config_names = $storage
->listAll();
}
return $config_names;
}