You are here

class ConfigDevelSaveEvent in Configuration development 8

The ConfigDevelSaveEvent class.

Hierarchy

  • class \Drupal\config_devel\Event\ConfigDevelSaveEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of ConfigDevelSaveEvent

2 files declare their use of ConfigDevelSaveEvent
ConfigDevelAutoExportSubscriber.php in src/EventSubscriber/ConfigDevelAutoExportSubscriber.php
ConfigImporterExporter.php in src/ConfigImporterExporter.php

File

src/Event/ConfigDevelSaveEvent.php, line 10

Namespace

Drupal\config_devel\Event
View source
class ConfigDevelSaveEvent extends Event {

  /**
   * An array of files names that will  be written.
   *
   * @var array
   */
  protected $fileNames = [];

  /**
   * An array representing the config object to be written.
   *
   * @var array
   */
  protected $data;

  /**
   * ConfigDevelSaveEvent constructor.
   *
   * @param array $file_names
   *   The config file names.
   * @param array $data
   *   The config data.
   */
  public function __construct(array $file_names, array $data) {
    $this->fileNames = $file_names;
    $this->data = $data;
  }

  /**
   * Gets the filenames that will be saved.
   *
   * @return array
   *   An array of file names.
   */
  public function getFileNames() {
    return $this->fileNames;
  }

  /**
   * Sets the file names.
   *
   * @param array $file_names
   *   An array of file names to be written out
   */
  public function setFileNames(array $file_names) {
    $this->fileNames = $file_names;
  }

  /**
   * Gets the data representing the config object.
   *
   * @return array
   *   An array of config data.
   */
  public function getData() {
    return $this->data;
  }

  /**
   * Sets the data for the config object.
   *
   * @param array $data
   *   The config data.
   */
  public function setData(array $data) {
    $this->data = $data;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigDevelSaveEvent::$data protected property An array representing the config object to be written.
ConfigDevelSaveEvent::$fileNames protected property An array of files names that will be written.
ConfigDevelSaveEvent::getData public function Gets the data representing the config object.
ConfigDevelSaveEvent::getFileNames public function Gets the filenames that will be saved.
ConfigDevelSaveEvent::setData public function Sets the data for the config object.
ConfigDevelSaveEvent::setFileNames public function Sets the file names.
ConfigDevelSaveEvent::__construct public function ConfigDevelSaveEvent constructor.