function EventSubscriber::onConfigImporterMissingContentTwo

Same name in other branches
  1. 9 core/modules/config/tests/config_import_test/src/EventSubscriber.php \Drupal\config_import_test\EventSubscriber::onConfigImporterMissingContentTwo()
  2. 10 core/modules/config/tests/config_import_test/src/EventSubscriber.php \Drupal\config_import_test\EventSubscriber::onConfigImporterMissingContentTwo()
  3. 11.x core/modules/config/tests/config_import_test/src/EventSubscriber.php \Drupal\config_import_test\EventSubscriber::onConfigImporterMissingContentTwo()

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 74

Class

EventSubscriber
Config import subscriber for config import events.

Namespace

Drupal\config_import_test

Code

public function onConfigImporterMissingContentTwo(MissingContentEvent $event) {
    if ($this->state
        ->get('config_import_test.config_import_missing_content', FALSE) && $this->state
        ->get('config_import_test.config_import_missing_content_two', FALSE) === FALSE) {
        $missing = $event->getMissingContent();
        $uuid = key($missing);
        $this->state
            ->set('config_import_test.config_import_missing_content_two', key($missing));
        $event->resolveMissingContent($uuid);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.