class MissingContentEvent in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Config/Importer/MissingContentEvent.php \Drupal\Core\Config\Importer\MissingContentEvent
Wraps a configuration event for event listeners.
Hierarchy
- class \Symfony\Component\EventDispatcher\Event
- class \Drupal\Core\Config\Importer\MissingContentEvent
Expanded class hierarchy of MissingContentEvent
See also
\Drupal\Core\Config\Config\ConfigEvents::IMPORT_MISSING_CONTENT
2 files declare their use of MissingContentEvent
- ConfigImporter.php in core/
lib/ Drupal/ Core/ Config/ ConfigImporter.php - Contains \Drupal\Core\Config\ConfigImporter.
- EventSubscriber.php in core/
modules/ config/ tests/ config_import_test/ src/ EventSubscriber.php - Contains \Drupal\config_import_test\EventSubscriber.
File
- core/
lib/ Drupal/ Core/ Config/ Importer/ MissingContentEvent.php, line 17 - Contains \Drupal\Core\Config\Importer\MissingContentEvent.
Namespace
Drupal\Core\Config\ImporterView source
class MissingContentEvent extends Event {
/**
* A list of missing content dependencies.
*
* @var array
*/
protected $missingContent;
/**
* Constructs a configuration import missing content event object.
*
* @param array $missing_content
* Missing content information.
*/
public function __construct(array $missing_content) {
$this->missingContent = $missing_content;
}
/**
* Gets missing content information.
*
* @return array
* A list of missing content dependencies. The array is keyed by UUID. Each
* value is an array with the following keys: 'entity_type', 'bundle' and
* 'uuid'.
*/
public function getMissingContent() {
return $this->missingContent;
}
/**
* Resolves the missing content by removing it from the list.
*
* @param string $uuid
* The UUID of the content entity to mark resolved.
*
* @return $this
* The MissingContentEvent object.
*/
public function resolveMissingContent($uuid) {
if (isset($this->missingContent[$uuid])) {
unset($this->missingContent[$uuid]);
}
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
private | property | ||
Event:: |
public | function | Returns the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Gets the event's name. | |
Event:: |
public | function | Returns whether further event listeners should be triggered. | |
Event:: |
public | function | Stores the EventDispatcher that dispatches this Event. | |
Event:: |
public | function | Sets the event's name property. | |
Event:: |
public | function | Stops the propagation of the event to further event listeners. | |
MissingContentEvent:: |
protected | property | A list of missing content dependencies. | |
MissingContentEvent:: |
public | function | Gets missing content information. | |
MissingContentEvent:: |
public | function | Resolves the missing content by removing it from the list. | |
MissingContentEvent:: |
public | function | Constructs a configuration import missing content event object. |