public function DefaultContentConfigSubscriber::onConfigImport in Default Content for D8 8
Same name and namespace in other branches
- 2.0.x 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);
}
}