help.module

You are here

  1. 7 modules/help/help.module
  2. 4.6 modules/help.module
  3. 4.7 modules/help.module
  4. 5 modules/help/help.module
  5. 6 modules/help/help.module
  6. 8 core/modules/help/help.module

Manages displaying online help.

Functions

Namesort descending Description
help_help Implementation of hook_help().
help_menu Implementation of hook_menu().

File

modules/help/help.module
View source
  1. <?php
  2. /**
  3. * @file
  4. * Manages displaying online help.
  5. */
  6. /**
  7. * Implementation of hook_menu().
  8. */
  9. function help_menu() {
  10. $items['admin/help'] = array(
  11. 'title' => 'Help',
  12. 'page callback' => 'help_main',
  13. 'access arguments' => array('access administration pages'),
  14. 'weight' => 9,
  15. 'file' => 'help.admin.inc',
  16. );
  17. foreach (module_implements('help', TRUE) as $module) {
  18. $items['admin/help/'. $module] = array(
  19. 'title' => $module,
  20. 'page callback' => 'help_page',
  21. 'page arguments' => array(2),
  22. 'access arguments' => array('access administration pages'),
  23. 'type' => MENU_CALLBACK,
  24. 'file' => 'help.admin.inc',
  25. );
  26. }
  27. return $items;
  28. }
  29. /**
  30. * Implementation of hook_help().
  31. */
  32. function help_help($path, $arg) {
  33. switch ($path) {
  34. case 'admin/help':
  35. $output = '<p>'. t('This guide provides context sensitive help on the use and configuration of <a href="@drupal">Drupal</a> and its modules, and is a supplement to the more extensive online <a href="@handbook">Drupal handbook</a>. The online handbook may contain more up-to-date information, is annotated with helpful user-contributed comments, and serves as the definitive reference point for all Drupal documentation.', array('@drupal' => 'http://drupal.org', '@handbook' => 'http://drupal.org/handbook')) .'</p>';
  36. return $output;
  37. case 'admin/help#help':
  38. $output = '<p>'. t('The help module provides context sensitive help on the use and configuration of <a href="@drupal">Drupal</a> and its modules, and is a supplement to the more extensive online <a href="@handbook">Drupal handbook</a>. The online handbook may contain more up-to-date information, is annotated with helpful user-contributed comments, and serves as the definitive reference point for all Drupal documentation.', array('@drupal' => 'http://drupal.org', '@handbook' => 'http://drupal.org/handbook')) .'</p>';
  39. $output .= '<p>'. t('For more information, see the online handbook entry for <a href="@help">Help module</a>.', array('@help' => 'http://drupal.org/handbook/modules/help/')) .'</p>';
  40. return $output;
  41. }
  42. }