Code coverage for /20081101/modules/help/help.module

Line #Times calledCode
1
<?php
2
// $Id: help.module,v 1.81 2008/05/06 12:18:47 dries Exp $
3
4
/**
5
 * @file
6
 * Manages displaying online help.
7
 */
8
9
/**
10
 * Implementation of hook_menu().
11
 */
122366
function help_menu() {
13159
  $items['admin/help'] = array(
14159
    'title' => 'Help',
15159
    'page callback' => 'help_main',
16159
    'access arguments' => array('access administration pages'),
17159
    'weight' => 9,
18
  );
19
20159
  foreach (module_implements('help', TRUE) as $module) {
21159
    $items['admin/help/' . $module] = array(
22159
      'title' => $module,
23159
      'page callback' => 'help_page',
24159
      'page arguments' => array(2),
25159
      'access arguments' => array('access administration pages'),
26159
      'type' => MENU_CALLBACK,
27
    );
28159
  }
29
30159
  return $items;
310
}
32
33
/**
34
 * Implementation of hook_help().
35
 */
362366
function help_help($path, $arg) {
37
  switch ($path) {
381678
    case 'admin/help':
390
      $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>';
400
      return $output;
411678
    case 'admin/help#help':
4212
      $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>';
4312
      $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>';
4412
      return $output;
450
  }
461676
}
472366