protected function ConfigProviderBase::getEnabledExtensions in Configuration Provider 8
Same name and namespace in other branches
- 8.2 src/Plugin/ConfigProviderBase.php \Drupal\config_provider\Plugin\ConfigProviderBase::getEnabledExtensions()
Gets the list of enabled extensions including both modules and themes.
Return value
array A list of enabled extensions which includes both modules and themes.
1 call to ConfigProviderBase::getEnabledExtensions()
- ConfigProviderOptional::addInstallableConfig in src/
Plugin/ ConfigProvider/ ConfigProviderOptional.php - Adds configuration that is available to be installed or updated.
File
- src/
Plugin/ ConfigProviderBase.php, line 111
Class
- ConfigProviderBase
- Base class for Configuration provider plugins.
Namespace
Drupal\config_provider\PluginCode
protected function getEnabledExtensions() {
// Read enabled extensions directly from configuration to avoid circular
// dependencies on ModuleHandler and ThemeHandler.
$extension_config = $this->configFactory
->get('core.extension');
$enabled_extensions = (array) $extension_config
->get('module');
$enabled_extensions += (array) $extension_config
->get('theme');
// Core can provide configuration.
$enabled_extensions['core'] = 'core';
return array_keys($enabled_extensions);
}