"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/lib/Drupal/Core/Config/ConfigImporterEvent.php" (26 Nov 2020, 1485 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "ConfigImporterEvent.php" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 9.0.8_vs_9.1.0-rc1.

    1 <?php
    2 
    3 namespace Drupal\Core\Config;
    4 
    5 use Symfony\Component\EventDispatcher\Event;
    6 
    7 class ConfigImporterEvent extends Event {
    8   /**
    9    * Configuration import object.
   10    *
   11    * @var \Drupal\Core\Config\ConfigImporter
   12    */
   13   protected $configImporter;
   14 
   15   /**
   16    * Constructs ConfigImporterEvent.
   17    *
   18    * @param \Drupal\Core\Config\ConfigImporter $config_importer
   19    *   A config import object to notify listeners about.
   20    */
   21   public function __construct(ConfigImporter $config_importer) {
   22     $this->configImporter = $config_importer;
   23   }
   24 
   25   /**
   26    * Gets the config import object.
   27    *
   28    * @return \Drupal\Core\Config\ConfigImporter
   29    *   The ConfigImporter object.
   30    */
   31   public function getConfigImporter() {
   32     return $this->configImporter;
   33   }
   34 
   35   /**
   36    * Gets the list of changes that will be imported.
   37    *
   38    * @param string $op
   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
   43    *   default collection.
   44    *
   45    * @return array
   46    *   An array of config changes that are yet to be imported.
   47    *
   48    * @see \Drupal\Core\Config\StorageComparerInterface::getChangelist()
   49    */
   50   public function getChangelist($op = NULL, $collection = StorageInterface::DEFAULT_COLLECTION) {
   51     return $this->configImporter->getStorageComparer()->getChangelist($op, $collection);
   52   }
   53 
   54 }