Skip to content
Snippets Groups Projects
Verified Commit 4f22397c authored by Dave Long's avatar Dave Long
Browse files

Revert "Issue #3414993 by alexpott: Add ConfigImporter to...

Revert "Issue #3414993 by alexpott: Add ConfigImporter to \Drupal\Core\Config\Importer\MissingContentEvent"

This reverts commit 476e65a1.
parent 93cb498a
No related branches found
No related tags found
8 merge requests!8376Drupal views: adding more granularity to the ‘use ajax’ functionality,!8300Issue #3443586 View area displays even when parent view has no results.,!7567Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7565Issue #3153723 by quietone, Hardik_Patel_12: Change the scaffolding...,!7509Change label "Block description" to "Block type",!7344Issue #3292350 by O'Briat, KlemenDEV, hswong3i, smustgrave, quietone: Update...,!6922Issue #3412959 by quietone, smustgrave, longwave: Fix 12 'un' words,!6848Issue #3417553 by longwave: Remove withConsecutive() in CacheCollectorTest
Pipeline #100758 passed with warnings
+1
......@@ -698,7 +698,7 @@ protected function processMissingContent(&$context) {
$missing_content = $sandbox['missing_content']['data'];
}
if (!empty($missing_content)) {
$event = new MissingContentEvent($missing_content, $this);
$event = new MissingContentEvent($missing_content);
// Fire an event to allow listeners to create the missing content.
$this->eventDispatcher->dispatch($event, ConfigEvents::IMPORT_MISSING_CONTENT);
$sandbox['missing_content']['data'] = $event->getMissingContent();
......
......@@ -2,15 +2,14 @@
namespace Drupal\Core\Config\Importer;
use Drupal\Core\Config\ConfigImporter;
use Drupal\Core\Config\ConfigImporterEvent;
use Drupal\Component\EventDispatcher\Event;
/**
* Wraps a configuration event for event listeners.
*
* @see \Drupal\Core\Config\ConfigEvents::IMPORT_MISSING_CONTENT
*/
class MissingContentEvent extends ConfigImporterEvent {
class MissingContentEvent extends Event {
/**
* A list of missing content dependencies.
......@@ -24,11 +23,8 @@ class MissingContentEvent extends ConfigImporterEvent {
*
* @param array $missing_content
* Missing content information.
* @param \Drupal\Core\Config\ConfigImporter $config_importer
* The config importer that triggered this event.
*/
public function __construct(array $missing_content, ConfigImporter $config_importer) {
parent::__construct($config_importer);
public function __construct(array $missing_content) {
$this->missingContent = $missing_content;
}
......
......@@ -4,7 +4,6 @@
use Drupal\Core\Config\ConfigCrudEvent;
use Drupal\Core\Config\ConfigEvents;
use Drupal\Core\Config\ConfigImporter;
use Drupal\Core\Config\ConfigImporterEvent;
use Drupal\Core\Config\Importer\MissingContentEvent;
use Drupal\Core\State\StateInterface;
......@@ -73,9 +72,6 @@ public function onConfigImporterMissingContentOne(MissingContentEvent $event) {
* The missing content event.
*/
public function onConfigImporterMissingContentTwo(MissingContentEvent $event) {
if (!$event->getConfigImporter() instanceof ConfigImporter) {
throw new \LogicException('\Drupal\Core\Config\Importer\MissingContentEvent is missing the ConfigImporter');
}
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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment