function config_sync_get_extensions in Configuration Synchronizer 8
Returns an array of Extension objects of the given type.
Parameters
array $names: An array of extension names.
$type: The type of extension to return.
Return value
\Drupal\Core\Extension\Extension[] The requested extensions.
2 calls to config_sync_get_extensions()
- config_sync_modules_installed in ./
config_sync.module - Implements hook_modules_installed().
- config_sync_themes_installed in ./
config_sync.module - Implements hook_themes_installed().
File
- ./
config_sync.module, line 64 - Manage synchronizing configuration from extensions.
Code
function config_sync_get_extensions(array $names, $type) {
$extensions = [];
foreach ($names as $name) {
$pathname = drupal_get_filename($type, $name);
$extensions[] = new Extension(\Drupal::root(), $type, $pathname);
}
return $extensions;
}