function block_modules_installed

Same name and namespace in other branches
  1. 9 core/modules/block/block.module \block_modules_installed()

Implements hook_modules_installed().

See also

block_themes_installed()

File

core/modules/block/block.module, line 154

Code

function block_modules_installed($modules) {
  // block_themes_installed() does not call block_theme_initialize() during site
  // installation because block configuration can be optional or provided by the
  // profile. Now, when the profile is installed, this configuration exists,
  // call block_theme_initialize() for all installed themes.
  $profile = \Drupal::installProfile();
  if (in_array($profile, $modules, TRUE)) {
    foreach (\Drupal::service('theme_handler')->listInfo() as $theme => $data) {
      block_theme_initialize($theme);
    }
  }
}

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