Code coverage for /20080809/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
 */
122027
function help_menu() {
1383
  $items['admin/help'] = array(
1483
    'title' => 'Help',
1583
    'page callback' => 'help_main',
1683
    'access arguments' => array('access administration pages'),
1783
    'weight' => 9,
18
  );
19
2083
  foreach (module_implements('help', TRUE) as $module) {
2183
    $items['admin/help/' . $module] = array(
2283
      'title' => $module,
2383
      'page callback' => 'help_page',
2483
      'page arguments' => array(2),
2583
      'access arguments' => array('access administration pages'),
2683
      'type' => MENU_CALLBACK,
27
    );
2883
  }
29
3083
  return $items;
310
}
32
33
/**
34
 * Implementation of hook_help().
35
 */
362027
function help_help($path, $arg) {
37
  switch ($path) {
381491
    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;
411491
    case 'admin/help#help':
4211
      $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>';
4311
      $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>';
4411
      return $output;
450
  }
461489
}
472027