You are here

function config_rewrite_module_preinstall in Configuration Rewrite 8

Implements hook_module_preinstall().

Allow config to be rewritten before a module is installed.

File

./config_rewrite.module, line 15
Allows modules to rewrite configuration provided by other extensions.

Code

function config_rewrite_module_preinstall($module) {
  global $install_state;

  // Rewrite config only the site is not being installed from configuration.
  if (empty($install_state['config_install_path'])) {
    \Drupal::service('config_rewrite.config_rewriter')
      ->rewriteModuleConfig($module);
  }
}