3 namespace Drupal\Core\Config;
6 * Defines events for the configuration system.
8 * @see \Drupal\Core\Config\ConfigCrudEvent
10 final class ConfigEvents {
13 * Name of the event fired when saving a configuration object.
15 * This event allows modules to perform an action whenever a configuration
16 * object is saved. The event listener method receives a
17 * \Drupal\Core\Config\ConfigCrudEvent instance.
19 * See hook_update_N() documentation for safe configuration API usage and
20 * restrictions as this event will be fired when configuration is saved by
25 * @see \Drupal\Core\Config\ConfigCrudEvent
26 * @see \Drupal\Core\Config\Config::save()
27 * @see \Drupal\Core\Config\ConfigFactory::onConfigSave()
28 * @see hook_update_N()
32 const SAVE = 'config.save';
35 * Name of the event fired when deleting a configuration object.
37 * This event allows modules to perform an action whenever a configuration
38 * object is deleted. The event listener method receives a
39 * \Drupal\Core\Config\ConfigCrudEvent instance.
41 * See hook_update_N() documentation for safe configuration API usage and
42 * restrictions as this event will be fired when configuration is deleted by
47 * @see \Drupal\Core\Config\ConfigCrudEvent
48 * @see \Drupal\Core\Config\Config::delete()
49 * @see \Drupal\Core\Config\ConfigFactory::onConfigDelete()
50 * @see hook_update_N()
54 const DELETE = 'config.delete';
57 * Name of the event fired when renaming a configuration object.
59 * This event allows modules to perform an action whenever a configuration
60 * object's name is changed. The event listener method receives a
61 * \Drupal\Core\Config\ConfigRenameEvent instance.
63 * See hook_update_N() documentation for safe configuration API usage and
64 * restrictions as this event will be fired when configuration is renamed by
69 * @see \Drupal\Core\Config\ConfigRenameEvent
70 * @see \Drupal\Core\Config\ConfigFactoryInterface::rename()
71 * @see hook_update_N()
75 const RENAME = 'config.rename';
78 * Name of the event fired when validating imported configuration.
80 * This event allows modules to perform additional validation operations when
81 * configuration is being imported. The event listener method receives a
82 * \Drupal\Core\Config\ConfigImporterEvent instance.
86 * @see \Drupal\Core\Config\ConfigImporterEvent
87 * @see \Drupal\Core\Config\ConfigImporter::validate().
88 * @see \Drupal\Core\EventSubscriber\ConfigImportSubscriber::onConfigImporterValidate().
92 const IMPORT_VALIDATE = 'config.importer.validate';
95 * Name of the event fired when importing configuration to target storage.
97 * This event allows modules to perform additional actions when configuration
98 * is imported. The event listener method receives a
99 * \Drupal\Core\Config\ConfigImporterEvent instance.
103 * @see \Drupal\Core\Config\ConfigImporterEvent
104 * @see \Drupal\Core\Config\ConfigImporter::import().
105 * @see \Drupal\Core\EventSubscriber\ConfigSnapshotSubscriber::onConfigImporterImport().
109 const IMPORT = 'config.importer.import';
112 * Name of event fired when missing content dependencies are detected.
114 * Events subscribers are fired as part of the configuration import batch.
115 * Each subscribe should call
116 * \Drupal\Core\Config\MissingContentEvent::resolveMissingContent() when they
117 * address a missing dependency. To address large amounts of dependencies
118 * subscribers can call
119 * \Drupal\Core\Config\MissingContentEvent::stopPropagation() which will stop
120 * calling other events and guarantee that the configuration import batch will
121 * fire the event again to continue processing missing content dependencies.
123 * @see \Drupal\Core\Config\ConfigImporter::processMissingContent()
124 * @see \Drupal\Core\Config\MissingContentEvent
126 const IMPORT_MISSING_CONTENT = 'config.importer.missing_content';
129 * Name of event fired to collect information on all config collections.
131 * This event allows modules to add to the list of configuration collections
132 * retrieved by \Drupal\Core\Config\ConfigManager::getConfigCollectionInfo().
133 * The event listener method receives a
134 * \Drupal\Core\Config\ConfigCollectionInfo instance.
138 * @see \Drupal\Core\Config\ConfigCollectionInfo
139 * @see \Drupal\Core\Config\ConfigManager::getConfigCollectionInfo()
140 * @see \Drupal\Core\Config\ConfigFactoryOverrideBase
144 const COLLECTION_INFO = 'config.collection_info';