
| Current Path : /var/www/html/ift/web/core/lib/Drupal/Core/Config/Importer/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/ift/web/core/lib/Drupal/Core/Config/Importer/FinalMissingContentSubscriber.php |
<?php
namespace Drupal\Core\Config\Importer;
use Drupal\Core\Config\ConfigEvents;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Final event subscriber to the missing content event.
*
* Ensure that all missing content dependencies are removed from the event so
* the importer can complete.
*
* @see \Drupal\Core\Config\ConfigImporter::processMissingContent()
*/
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][] = ['onMissingContent', -1024];
return $events;
}
}