You are here

function demo_umami_content_module_preinstall in Drupal 9

Implements hook_module_preinstall().

File

core/profiles/demo_umami/modules/demo_umami_content/demo_umami_content.install, line 13
Install, update and uninstall functions for the module.

Code

function demo_umami_content_module_preinstall($module) {
  if ($module === 'demo_umami_content' && !\Drupal::service('config.installer')
    ->isSyncing()) {

    // Run before importing config so blocks are created with the correct
    // dependencies.
    \Drupal::classResolver(InstallHelper::class)
      ->importContent();
  }
}