Simpletest Coverage - modules/help/help.module

1 <?php
2 // $Id: help.module,v 1.87 2009/08/12 23:51:19 webchick Exp $
3
4 /**
5 * @file
6 * Manages displaying online help.
7 */
8
9 /**
10 * Implement hook_menu().
11 */
12 function help_menu() {
13 $items['admin/help'] = array(
14 'title' => 'Help',
15 'page callback' => 'help_main',
16 'access arguments' => array('access administration pages'),
17 'weight' => 9,
18 );
19
20 foreach (module_implements('help', TRUE) as $module) {
21 $items['admin/help/' . $module] = array(
22 'title' => $module,
23 'page callback' => 'help_page',
24 'page arguments' => array(2),
25 'access arguments' => array('access administration pages'),
26 'type' => MENU_CALLBACK,
27 );
28 }
29
30 return $items;
31 }
32
33 /**
34 * Implement hook_help().
35 */
36 function help_help($path, $arg) {
37 switch ($path) {
38 case 'admin/help':
39 $output = '<p>' . t('Please follow these steps to set up and start using your website:') . '</p>';
40 $output .= '<ol>';
41 $output .= '<li>' . t('<strong>Configure your website</strong> Once logged in, visit the <a href="@admin">administration section</a>, where you can <a href="@config">customize and configure</a> all aspects of your website.', array('@admin' => url('admin'), '@config' => url('admin/settings'))) . '</li>';
42 $output .= '<li>' . t('<strong>Enable additional functionality</strong> Next, visit the <a href="@modules">module list</a> and enable features which suit your specific needs. You can find additional modules in the <a href="@download_modules">Drupal modules download section</a>.', array('@modules' => url('admin/config/modules'), '@download_modules' => 'http://drupal.org/project/modules')) . '</li>';
43 $output .= '<li>' . t('<strong>Customize your website design</strong> To change the "look and feel" of your website, visit the <a href="@themes">themes section</a>. You may choose from one of the included themes or download additional themes from the <a href="@download_themes">Drupal themes download section</a>.', array('@themes' => url('admin/appearance'), '@download_themes' => 'http://drupal.org/project/themes')) . '</li>';
44 $output .= '<li>' . t('<strong>Start posting content</strong> Finally, you can <a href="@content">add new content</a> for your website.', array('@content' => url('node/add'))) . '</li>';
45 $output .= '</ol>';
46 $output .= '<p>' . t('For more information, please refer to the specific topics listed in the next section, or the <a href="@handbook">online Drupal handbooks</a>. You may also post at the <a href="@forum">Drupal forum</a>, or view the wide range of <a href="@support">other support options</a> available.', array('@help' => url('admin/help'), '@handbook' => 'http://drupal.org/handbooks', '@forum' => 'http://drupal.org/forum', '@support' => 'http://drupal.org/support')) . '</p>';
47 return $output;
48 case 'admin/help#help':
49 $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>';
50 $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>';
51 return $output;
52 }
53 }
54

Legend

Missed
lines code that were not excersized during program execution.
Covered
lines code were excersized during program execution.
Comment/non executable
Comment or non-executable line of code.
Dead
lines of code that according to xdebug could not be executed. This is counted as coverage code because in almost all cases it is code that runnable.