function devel_form_system_modules_alter in Devel 7
Same name and namespace in other branches
- 8.3 devel.module \devel_form_system_modules_alter()
- 8 devel.module \devel_form_system_modules_alter()
- 8.2 devel.module \devel_form_system_modules_alter()
- 4.x devel.module \devel_form_system_modules_alter()
Implements hook_form_alter().
Adds mouse-over hints on the Modules page to display module base names.
File
- ./
devel.module, line 2280 - This module holds functions useful for Drupal development.
Code
function devel_form_system_modules_alter(&$form, &$form_state) {
if (user_access('access devel information') && variable_get('devel_raw_names', FALSE) && isset($form['modules']) && is_array($form['modules'])) {
foreach (element_children($form['modules']) as $key) {
if (isset($form['modules'][$key]['name']['#markup'])) {
$form['modules'][$key]['name']['#markup'] = '<span title="' . $key . '">' . $form['modules'][$key]['name']['#markup'] . '</span>';
}
elseif (is_array($form['modules'][$key])) {
foreach (element_children($form['modules'][$key]) as $key2) {
if (isset($form['modules'][$key][$key2]['name']['#markup'])) {
$form['modules'][$key][$key2]['name']['#markup'] = '<span title="' . $key2 . '">' . $form['modules'][$key][$key2]['name']['#markup'] . '</span>';
}
}
}
}
}
}