ConfigEvents
final class ConfigEvents (View source)
Defines events for the configuration system.
Constants
| SAVE |
Name of the event fired when saving a configuration object. This event allows modules to perform an action whenever a configuration object is saved. The event listener method receives a \Drupal\Core\Config\ConfigCrudEvent instance. See hook_update_N() documentation for safe configuration API usage and restrictions as this event will be fired when configuration is saved by hook_update_N(). |
| DELETE |
Name of the event fired when deleting a configuration object. This event allows modules to perform an action whenever a configuration object is deleted. The event listener method receives a \Drupal\Core\Config\ConfigCrudEvent instance. See hook_update_N() documentation for safe configuration API usage and restrictions as this event will be fired when configuration is deleted by hook_update_N(). |
| RENAME |
Name of the event fired when renaming a configuration object. This event allows modules to perform an action whenever a configuration object's name is changed. The event listener method receives a \Drupal\Core\Config\ConfigRenameEvent instance. See hook_update_N() documentation for safe configuration API usage and restrictions as this event will be fired when configuration is renamed by hook_update_N(). |
| IMPORT_VALIDATE |
Name of the event fired when validating imported configuration. This event allows modules to perform additional validation operations when configuration is being imported. The event listener method receives a \Drupal\Core\Config\ConfigImporterEvent instance. |
| IMPORT |
Name of the event fired when importing configuration to target storage. This event allows modules to perform additional actions when configuration is imported. The event listener method receives a \Drupal\Core\Config\ConfigImporterEvent instance. |
| IMPORT_MISSING_CONTENT |
Name of event fired when missing content dependencies are detected. Events subscribers are fired as part of the configuration import batch. Each subscribe should call \Drupal\Core\Config\MissingContentEvent::resolveMissingContent() when they address a missing dependency. To address large amounts of dependencies subscribers can call \Drupal\Core\Config\MissingContentEvent::stopPropagation() which will stop calling other events and guarantee that the configuration import batch will fire the event again to continue processing missing content dependencies. |
| COLLECTION_INFO |
Name of event fired to collect information on all config collections. This event allows modules to add to the list of configuration collections retrieved by \Drupal\Core\Config\ConfigManager::getConfigCollectionInfo(). The event listener method receives a \Drupal\Core\Config\ConfigCollectionInfo instance. |
| STORAGE_TRANSFORM_IMPORT |
Name of the event fired just before importing configuration. This event allows subscribers to modify the configuration which is about to be imported. The event listener method receives a \Drupal\Core\Config\StorageTransformEvent instance. This event contains a config storage which subscribers can interact with and which will finally be used to import the configuration from. Together with \Drupal\Core\Config\ConfigEvents::STORAGE_TRANSFORM_EXPORT subscribers can alter the active configuration in a config sync workflow instead of just overriding at runtime via the config-override system. This allows a complete customization of the workflow including additional modules and editable configuration in different environments. |
| STORAGE_TRANSFORM_EXPORT |
Name of the event fired when the export storage is used. This event allows subscribers to modify the configuration which is about to be exported. The event listener method receives a \Drupal\Core\Config\StorageTransformEvent instance. This event contains a config storage which subscribers can interact with and which will finally be used to export the configuration from. |