function EventSubscriber::onConfigImporterMissingContentOne
Same name in other branches
- 8.9.x core/modules/config/tests/config_import_test/src/EventSubscriber.php \Drupal\config_import_test\EventSubscriber::onConfigImporterMissingContentOne()
- 10 core/modules/config/tests/config_import_test/src/EventSubscriber.php \Drupal\config_import_test\EventSubscriber::onConfigImporterMissingContentOne()
- 11.x core/modules/config/tests/config_import_test/src/EventSubscriber.php \Drupal\config_import_test\EventSubscriber::onConfigImporterMissingContentOne()
Handles the missing content event.
Parameters
\Drupal\Core\Config\Importer\MissingContentEvent $event: The missing content event.
File
-
core/
modules/ config/ tests/ config_import_test/ src/ EventSubscriber.php, line 56
Class
- EventSubscriber
- Config import subscriber for config import events.
Namespace
Drupal\config_import_testCode
public function onConfigImporterMissingContentOne(MissingContentEvent $event) {
if ($this->state
->get('config_import_test.config_import_missing_content', FALSE) && $this->state
->get('config_import_test.config_import_missing_content_one', FALSE) === FALSE) {
$missing = $event->getMissingContent();
$uuid = key($missing);
$this->state
->set('config_import_test.config_import_missing_content_one', key($missing));
$event->resolveMissingContent($uuid);
// Stopping propagation ensures that onConfigImporterMissingContentTwo
// will be fired on the next batch step.
$event->stopPropagation();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.