You are here

function test_module_required_by_theme_system_info_alter in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/themes/test_theme_depending_on_modules/test_module_required_by_theme/test_module_required_by_theme.module \test_module_required_by_theme_system_info_alter()

Implements hook_system_info_alter().

File

core/modules/system/tests/themes/test_theme_depending_on_modules/test_module_required_by_theme/test_module_required_by_theme.module, line 13
This file provides testing functionality for update.php.

Code

function test_module_required_by_theme_system_info_alter(array &$info, Extension $file, $type) {
  if ($file
    ->getName() == 'test_theme_depending_on_modules') {
    $new_info = \Drupal::state()
      ->get('test_theme_depending_on_modules.system_info_alter');
    if ($new_info) {
      $info = $new_info + $info;
    }
  }
}