function DemoUmamiContentHooks::modulePreinstall

Same name and namespace in other branches
  1. 11.x core/profiles/demo_umami/modules/demo_umami_content/src/Hook/DemoUmamiContentHooks.php \Drupal\demo_umami_content\Hook\DemoUmamiContentHooks::modulePreinstall()

Implements hook_module_preinstall().

Attributes

#[Hook('module_preinstall')]

File

core/profiles/demo_umami/modules/demo_umami_content/src/Hook/DemoUmamiContentHooks.php, line 18

Class

DemoUmamiContentHooks
Hook implementations for demo_umami_content.

Namespace

Drupal\demo_umami_content\Hook

Code

public function modulePreinstall($module, bool $is_syncing) : void {
  if ($module === 'demo_umami_content' && !$is_syncing) {
    // Run before importing config so blocks are created with the correct
    // dependencies.
    \Drupal::classResolver(InstallHelper::class)->importContent();
  }
}

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