Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Config/ConfigEvents.php \Drupal\Core\Config\ConfigEvents::STORAGE_TRANSFORM_IMPORT
  2. 8.9.x core/lib/Drupal/Core/Config/ConfigEvents.php \Drupal\Core\Config\ConfigEvents::STORAGE_TRANSFORM_IMPORT
  3. 10 core/lib/Drupal/Core/Config/ConfigEvents.php \Drupal\Core\Config\ConfigEvents::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 = $event->getStorage();

This event is also fired when just viewing the difference of configuration to be imported independently of whether the import takes place or not. Use the \Drupal\Core\Config\ConfigEvents::IMPORT event to subscribe to the import having taken place.

See also




Related topics


core/lib/Drupal/Core/Config/ConfigEvents.php, line 159


Defines events for the configuration system.




const STORAGE_TRANSFORM_IMPORT = 'config.transform.import';

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.