help_page
modules/help/help.admin.inc, строка 21
- Версии
- 5
help_page()
- 6
help_page($name)
Menu callback; prints a page listing general help for a module.
Код
<?php
function help_page($name) {
$output = '';
if (module_hook($name, 'help')) {
$module = drupal_parse_info_file(drupal_get_path('module', $name) .'/'. $name .'.info');
drupal_set_title($module['name']);
$temp = module_invoke($name, 'help', "admin/help#$name", drupal_help_arg());
if (empty($temp)) {
$output .= t("No help is available for module %module.", array('%module' => $module['name']));
}
else {
$output .= $temp;
}
// Only print list of administration pages if the module in question has
// any such pages associated to it.
$admin_tasks = system_get_module_admin_tasks($name);
if (!empty($admin_tasks)) {
ksort($admin_tasks);
$output .= theme('item_list', $admin_tasks, t('@module administration pages', array('@module' => $module['name'])));
}
}
return $output;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии