ConfigEvents.php 1.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
<?php

/**
 * @file
 * Contains Drupal\Core\Config\Config\ConfigEvents.
 */

namespace Drupal\Core\Config;

/**
 * Defines events for the configuration system.
 */
class ConfigEvents {

  /**
   * Name of event fired when saving the configuration object.
   *
   * @see \Drupal\Core\Config\Config::save()
   * @see \Drupal\Core\Config\ConfigFactory::onConfigSave()
   */
  const SAVE = 'config.save';

  /**
   * Name of event fired when deleting the configuration object.
   *
   * @see \Drupal\Core\Config\Config::delete()
   */
  const DELETE = 'config.delete';

  /**
   * Name of event fired when renaming a configuration object.
   *
   * @see \Drupal\Core\Config\ConfigFactory::rename().
   */
  const RENAME = 'config.rename';

  /**
   * Name of event fired when collecting overrides for configuration objects.
   *
   * @see \Drupal\Core\Config\ConfigFactory::loadModuleOverrides().
   */
  const MODULE_OVERRIDES = 'config.module.overrides';

  /**
   * Name of event fired when validating in the configuration import process.
   *
   * @see \Drupal\Core\Config\ConfigImporter::validate().
   * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber::onConfigImporterValidate().
   */
  const VALIDATE = 'config.importer.validate';

  /**
   * Name of event fired when when importing configuration to target storage.
   *
   * @see \Drupal\Core\Config\ConfigImporter::import().
   * @see \Drupal\Core\EventSubscriber\ConfigSnapshotSubscriber::onConfigImporterImport().
   */
  const IMPORT = 'config.importer.import';

}