3 namespace Drupal\Core\Config\Importer;
5 use Symfony\Component\EventDispatcher\Event;
8 * Wraps a configuration event for event listeners.
10 * @see \Drupal\Core\Config\Config\ConfigEvents::IMPORT_MISSING_CONTENT
12 class MissingContentEvent extends Event {
15 * A list of missing content dependencies.
19 protected $missingContent;
22 * Constructs a configuration import missing content event object.
24 * @param array $missing_content
25 * Missing content information.
27 public function __construct(array $missing_content) {
28 $this->missingContent = $missing_content;
32 * Gets missing content information.
35 * A list of missing content dependencies. The array is keyed by UUID. Each
36 * value is an array with the following keys: 'entity_type', 'bundle' and
39 public function getMissingContent() {
40 return $this->missingContent;
44 * Resolves the missing content by removing it from the list.
47 * The UUID of the content entity to mark resolved.
50 * The MissingContentEvent object.
52 public function resolveMissingContent($uuid) {
53 if (isset($this->missingContent[$uuid])) {
54 unset($this->missingContent[$uuid]);