You are here

function monitoring_modules_installed in Monitoring 8

Implements hook_modules_installed().

File

./monitoring.module, line 57
Monitoring bootstrap file.

Code

function monitoring_modules_installed($modules) {
  if (\Drupal::service('config.installer')
    ->isSyncing()) {

    // Don't create any config when syncing.
    // @todo change to $is_syncing param after 8.9 is minimum per
    // https://www.drupal.org/node/3098920
    return;
  }

  // Update the installed modules.
  foreach ($modules as $module) {

    // Check for dependencies that are not initialized.
    if (\Drupal::moduleHandler()
      ->implementsHook($module, 'requirements') && !SensorConfig::load('core_requirements_' . $module)) {
      initialize_requirements_sensors($module);
    }
  }
}