public function FeaturesManager::import in Features 8.3
Same name and namespace in other branches
- 8.4 src/FeaturesManager.php \Drupal\features\FeaturesManager::import()
The import function.
Parameters
array $modules: An array of module names to import (revert)
bool $any: Set to TRUE to import config from non-Features modules.
Return value
array of config imported keyed by name of module, then: 'new': list of new config created keyed by name. 'updated': list of updated config keyed by name.
Overrides FeaturesManagerInterface::import
File
- src/
FeaturesManager.php, line 1458
Class
- FeaturesManager
- The FeaturesManager provides helper functions for building packages.
Namespace
Drupal\featuresCode
public function import($modules, $any = FALSE) {
$result = [];
foreach ($modules as $module_name) {
$package = $this
->loadPackage($module_name, $any);
$components = isset($package) ? $package
->getConfigOrig() : [];
if (empty($components)) {
continue;
}
$result[$module_name] = $this
->createConfiguration(array_fill_keys($components, []));
}
return $result;
}