function variable_admin_page_module in Variable 7
Same name and namespace in other branches
- 7.2 variable_admin/variable_admin.inc \variable_admin_page_module()
Variable overview, by group
1 string reference to 'variable_admin_page_module'
- variable_admin_menu in variable_admin/
variable_admin.module - Implements hook_menu().
File
- variable_admin/
variable_admin.inc, line 64 - Variable API module - Admin UI
Code
function variable_admin_page_module($name = NULL) {
variable_include();
if ($name && in_array($name, module_list())) {
$modules = system_list('module_enabled');
$module = $modules[$name];
drupal_set_title($module->info['name']);
$list = variable_list_module($name);
$build['description']['#markup'] = $module->info['description'];
$build['form'] = drupal_get_form('variable_edit_form', array_keys($list));
return $build;
}
else {
// Groups overview
$build['modules'] = array(
'#type' => 'vertical_tabs',
);
foreach (system_list('module_enabled') as $module) {
if ($variables = variable_list_module($module->name)) {
$build['modules'][$module->name] = array(
'#type' => 'fieldset',
'#title' => $module->info['name'],
'#collapsible' => TRUE,
'#collapsed' => TRUE,
'#description' => $module->info['description'] . ' ' . l(t('Edit module variables'), 'admin/config/system/variable/module/' . $module->name),
'#group' => 'modules',
);
$build['modules'][$module->name]['list'] = variable_admin_group_list($variables);
}
}
return $build;
}
}