You are here

function advanced_help_menu in Advanced Help 6

Same name and namespace in other branches
  1. 5 advanced_help.module \advanced_help_menu()
  2. 7 advanced_help.module \advanced_help_menu()

Implements hook_menu().

File

./advanced_help.module, line 38
Pluggable system to provide advanced help facilities for Drupal and modules.

Code

function advanced_help_menu() {

  // View help topic index.
  //
  // This is structured little oddly so that POTX can handle the translation.
  if (module_exists('help')) {
    $items['admin/advanced_help'] = array(
      'title' => 'Advanced help',
      'page callback' => 'advanced_help_index_page',
      'access arguments' => array(
        'view advanced help index',
      ),
      'weight' => 9,
    );
  }
  else {
    $items['admin/advanced_help'] = array(
      'title' => 'Help',
      'page callback' => 'advanced_help_index_page',
      'access arguments' => array(
        'view advanced help index',
      ),
      'weight' => 9,
    );
  }
  $items['advanced_help/search/%menu_tail'] = array(
    'title' => 'Search help',
    'page callback' => 'advanced_help_search_view',
    'page arguments' => array(
      'advanced_help',
    ),
    'access arguments' => array(
      'view advanced help index',
    ),
  );

  // View help topic.
  $items['help/%/%'] = array(
    'page callback' => 'advanced_help_topic_page',
    'page arguments' => array(
      1,
      2,
    ),
    'access arguments' => array(
      'view advanced help topic',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}