class FinalMissingContentSubscriber in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Config/Importer/FinalMissingContentSubscriber.php \Drupal\Core\Config\Importer\FinalMissingContentSubscriber
Final event subscriber to the missing content event.
Ensure that all missing content dependencies are removed from the event so the importer can complete.
Hierarchy
- class \Drupal\Core\Config\Importer\FinalMissingContentSubscriber implements EventSubscriberInterface
Expanded class hierarchy of FinalMissingContentSubscriber
See also
\Drupal\Core\Config\ConfigImporter::processMissingContent()
1 string reference to 'FinalMissingContentSubscriber'
- core.services.yml in core/
core.services.yml - core/core.services.yml
1 service uses FinalMissingContentSubscriber
File
- core/
lib/ Drupal/ Core/ Config/ Importer/ FinalMissingContentSubscriber.php, line 21 - Contains \Drupal\Core\Config\Importer\FinalMissingContentSubscriber.
Namespace
Drupal\Core\Config\ImporterView source
class FinalMissingContentSubscriber implements EventSubscriberInterface {
/**
* Handles the missing content event.
*
* @param \Drupal\Core\Config\Importer\MissingContentEvent $event
* The missing content event.
*/
public function onMissingContent(MissingContentEvent $event) {
foreach (array_keys($event
->getMissingContent()) as $uuid) {
$event
->resolveMissingContent($uuid);
}
}
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
// This should always be the final event as it will mark all content
// dependencies as resolved.
$events[ConfigEvents::IMPORT_MISSING_CONTENT][] = array(
'onMissingContent',
-1024,
);
return $events;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FinalMissingContentSubscriber:: |
public static | function |
Returns an array of event names this subscriber wants to listen to. Overrides EventSubscriberInterface:: |
|
FinalMissingContentSubscriber:: |
public | function | Handles the missing content event. |