simpletestauto_menu

Definition

simpletestauto_menu($may_cache)
simpletestauto.module, line 60

Description

implementation of menu hook

Code

<?php
function simpletestauto_menu($may_cache) {
  $items[] = array(
    'path' => 'admin/settings/simpletestauto',
    'title' => t('Simpletestauto Settings'),
    'description' => t('Simpletestauto settings page. Test server information, somet test settings, ...'),
    'callback' => 'drupal_get_form',
    'callback arguments' => array('simpletestauto_admin_settings'),
    'access' => user_access('administer site configuration'),
    'type' => MENU_NORMAL_ITEM,
  );
  
  $items[] = array(
    'path' => 'simpletest_auto/autocomplete',
    'title' => 'Simpletestauto autocomplete',
    'callback' => 'simpletest_auto_autocomplete',
    'access' => $view_access,
    'type' => MENU_CALLBACK,
  );
  if (arg(0) == 'node' && is_numeric(arg(1))) {
    $node = node_load(arg(1));
    if ($node->nid && $node->type == 'simpletestauto_test') {
      $items[] = array(
        'path' => 'node/'. arg(1) .'/resend',
        'title' => t('Resend'),
        'callback' => 'simpletest_resend',
        'callback arguments' => array($node),
        'access' => user_access('Administer test automation'),
        'weight' => 1,
        'type' => MENU_LOCAL_TASK,
      );
    }
  }
  return $items;
}
?>