You are here

class ConfigImporterEvent in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Config/ConfigImporterEvent.php \Drupal\Core\Config\ConfigImporterEvent

Hierarchy

Expanded class hierarchy of ConfigImporterEvent

6 files declare their use of ConfigImporterEvent
BundleConfigImportValidate.php in core/lib/Drupal/Core/Entity/Event/BundleConfigImportValidate.php
Contains \Drupal\Core\Entity\Event\BundleConfigImportValidate.
ConfigImportSubscriber.php in core/lib/Drupal/Core/EventSubscriber/ConfigImportSubscriber.php
Contains \Drupal\Core\EventSubscriber\ConfigImportSubscriber.
ConfigSnapshotSubscriber.php in core/lib/Drupal/Core/EventSubscriber/ConfigSnapshotSubscriber.php
Contains \Drupal\Core\EventSubscriber\ConfigSnapshotSubscriber.
ConfigSubscriber.php in core/modules/config/src/ConfigSubscriber.php
Contains \Drupal\config\ConfigSubscriber.
EventSubscriber.php in core/modules/config/tests/config_import_test/src/EventSubscriber.php
Contains \Drupal\config_import_test\EventSubscriber.

... See full list

File

core/lib/Drupal/Core/Config/ConfigImporterEvent.php, line 12
Contains \Drupal\Core\Config\ConfigImporterEvent.

Namespace

Drupal\Core\Config
View source
class ConfigImporterEvent extends Event {

  /**
   * Configuration import object.
   *
   * @var \Drupal\Core\Config\ConfigImporter
   */
  protected $configImporter;

  /**
   * Constructs ConfigImporterEvent.
   *
   * @param \Drupal\Core\Config\ConfigImporter $config_importer
   *   A config import object to notify listeners about.
   */
  public function __construct(ConfigImporter $config_importer) {
    $this->configImporter = $config_importer;
  }

  /**
   * Gets the config import object.
   *
   * @return \Drupal\Core\Config\ConfigImporter
   *   The ConfigImporter object.
   */
  public function getConfigImporter() {
    return $this->configImporter;
  }

  /**
   * Gets the list of changes that will be imported.
   *
   * @param string $op
   *   (optional) A change operation. Either delete, create or update. If
   *   supplied the returned list will be limited to this operation.
   * @param string $collection
   *   (optional) The collection to get the changelist for. Defaults to the
   *   default collection.
   *
   * @return array
   *   An array of config changes that are yet to be imported.
   *
   * @see \Drupal\Core\Config\StorageComparerInterface::getChangelist()
   */
  public function getChangelist($op = NULL, $collection = StorageInterface::DEFAULT_COLLECTION) {
    return $this->configImporter
      ->getStorageComparer()
      ->getChangelist($op, $collection);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigImporterEvent::$configImporter protected property Configuration import object.
ConfigImporterEvent::getChangelist public function Gets the list of changes that will be imported.
ConfigImporterEvent::getConfigImporter public function Gets the config import object.
ConfigImporterEvent::__construct public function Constructs ConfigImporterEvent.
Event::$dispatcher private property
Event::$name private property
Event::$propagationStopped private property
Event::getDispatcher Deprecated public function Returns the EventDispatcher that dispatches this Event.
Event::getName Deprecated public function Gets the event's name.
Event::isPropagationStopped public function Returns whether further event listeners should be triggered.
Event::setDispatcher Deprecated public function Stores the EventDispatcher that dispatches this Event.
Event::setName Deprecated public function Sets the event's name property.
Event::stopPropagation public function Stops the propagation of the event to further event listeners.