You are here

constant ConfigEvents::STORAGE_TRANSFORM_IMPORT in Drupal 8

Same name and namespace in other branches
  1. 9 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

\Drupal\Core\Config\StorageTransformEvent

\Drupal\Core\Config\ConfigEvents::STORAGE_TRANSFORM_EXPORT

\Drupal\Core\Config\ImportStorageTransformer::transform

Related topics

File

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

Class

ConfigEvents
Defines events for the configuration system.

Namespace

Drupal\Core\Config

Code

const STORAGE_TRANSFORM_IMPORT = 'config.transform.import';