Same name and namespace in other branches
- 9.3.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 9.0.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 9.1.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 9.2.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 9.4.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 6.x developer/hooks/core.php \hook_system_info_alter()
- 8.9.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 8.0.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 8.1.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 8.2.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 8.3.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 8.4.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 8.5.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 8.6.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 8.7.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 8.8.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
- 10.0.x core/lib/Drupal/Core/Extension/module.api.php \hook_system_info_alter()
Alter the information parsed from module and theme .info files
This hook is invoked in _system_rebuild_module_data() and in _system_rebuild_theme_data(). A module may implement this hook in order to add to or alter the data generated by reading the .info file with drupal_parse_info_file().
Parameters
$info: The .info file contents, passed by reference so that it can be altered.
$file: Full information about the module or theme, including $file->name, and $file->filename
$type: Either 'module' or 'theme', depending on the type of .info file that was passed.
Related topics
9 functions implement hook_system_info_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- dashboard_system_info_alter in modules/
dashboard/ dashboard.module - Implements hook_system_info_alter().
- field_system_info_alter in modules/
field/ field.module - Implements hook_system_info_alter().
- module_test_system_info_alter in modules/
simpletest/ tests/ module_test.module - Implements hook_system_info_alter().
- overlay_system_info_alter in modules/
overlay/ overlay.module - Implements hook_system_info_alter().
- system_system_info_alter in modules/
system/ system.module - Implements hook_system_info_alter().
2 invocations of hook_system_info_alter()
- _system_rebuild_module_data in modules/
system/ system.module - Helper function to scan and collect module .info data.
- _system_rebuild_theme_data in modules/
system/ system.module - Helper function to scan and collect theme .info data and their engines.
File
- modules/
system/ system.api.php, line 2086 - Hooks provided by Drupal core and the System module.
Code
function hook_system_info_alter(&$info, $file, $type) {
// Only fill this in if the .info file does not define a 'datestamp'.
if (empty($info['datestamp'])) {
$info['datestamp'] = filemtime($file->filename);
}
}
Comments
This hook is invoked in
Since this is the case, this hook will be invoked by the update.php before modules are updated. So if you are implementing this hook, keep this in mind.