3 namespace Drupal\Core\Config;
5 use Symfony\Component\EventDispatcher\Event;
7 class ConfigImporterEvent extends Event {
9 * Configuration import object.
11 * @var \Drupal\Core\Config\ConfigImporter
13 protected $configImporter;
16 * Constructs ConfigImporterEvent.
18 * @param \Drupal\Core\Config\ConfigImporter $config_importer
19 * A config import object to notify listeners about.
21 public function __construct(ConfigImporter $config_importer) {
22 $this->configImporter = $config_importer;
26 * Gets the config import object.
28 * @return \Drupal\Core\Config\ConfigImporter
29 * The ConfigImporter object.
31 public function getConfigImporter() {
32 return $this->configImporter;
36 * Gets the list of changes that will be imported.
39 * (optional) A change operation. Either delete, create or update. If
40 * supplied the returned list will be limited to this operation.
41 * @param string $collection
42 * (optional) The collection to get the changelist for. Defaults to the
46 * An array of config changes that are yet to be imported.
48 * @see \Drupal\Core\Config\StorageComparerInterface::getChangelist()
50 public function getChangelist($op = NULL, $collection = StorageInterface::DEFAULT_COLLECTION) {
51 return $this->configImporter->getStorageComparer()->getChangelist($op, $collection);