function system_admin_by_module
6.x system.admin.inc | system_admin_by_module() |
Menu callback; prints a listing of admin tasks for each installed module.
2 string references to 'system_admin_by_module'
- system_menu in drupal-6.x/
modules/ system/ system.module - Implementation of hook_menu().
- system_theme in drupal-6.x/
modules/ system/ system.module - Implementation of hook_theme().
File
- drupal-6.x/
modules/ system/ system.admin.inc, line 99 - Admin page callbacks for the system module.
Code
function system_admin_by_module() {
$modules = module_rebuild_cache();
$menu_items = array();
$help_arg = module_exists('help') ? drupal_help_arg() : FALSE;
foreach ($modules as $file) {
$module = $file->name;
if ($module == 'help') {
continue;
}
$admin_tasks = system_get_module_admin_tasks($module);
// Only display a section if there are any available tasks.
if (count($admin_tasks)) {
// Check for help links.
if ($help_arg && module_invoke($module, 'help', "admin/help#$module", $help_arg)) {
$admin_tasks[100] = l(t('Get help'), "admin/help/$module");
}
// Sort.
ksort($admin_tasks);
$menu_items[$file->info['name']] = array($file->info['description'], $admin_tasks);
}
}
return theme('system_admin_by_module', $menu_items);
}