public function DefaultContentConfigSubscriber::onConfigImport in Default Content for D8 2.0.x
Same name and namespace in other branches
- 8 src/Config/DefaultContentConfigSubscriber.php \Drupal\default_content\Config\DefaultContentConfigSubscriber::onConfigImport()
Creates default content after config synchronization.
Parameters
\Drupal\Core\Config\ConfigImporterEvent $event: The config importer event.
File
- src/
Config/ DefaultContentConfigSubscriber.php, line 38
Class
- DefaultContentConfigSubscriber
- Reacts to configuration events for the Default Content module.
Namespace
Drupal\default_content\ConfigCode
public function onConfigImport(ConfigImporterEvent $event) {
$modules = $event
->getConfigImporter()
->getExtensionChangelist('module', 'install');
foreach ($modules as $module) {
$this->defaultContentImporter
->importContent($module);
}
}