You are here

function coder_menu in Coder 5.2

Same name and namespace in other branches
  1. 5 coder.module \coder_menu()
  2. 6.2 coder.module \coder_menu()
  3. 6 coder.module \coder_menu()
  4. 7.2 coder.module \coder_menu()
  5. 7 coder.module \coder_menu()

Implementation of hook_menu().

File

./coder.module, line 85
Developer Module that assists with code review and version upgrade that supports a plug-in extensible hook system so contributed modules can define additional review standards.

Code

function coder_menu($may_cache = TRUE) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'coder',
      'title' => t('Code review'),
      'callback' => 'coder_page',
      'access' => user_access('view code review'),
      'type' => MENU_NORMAL_ITEM,
    );
    $items[] = array(
      'path' => 'coder/settings',
      'title' => t('Selection Form'),
      'callback' => 'coder_page',
      'access' => user_access('view code review'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -2,
    );
    $items[] = array(
      'path' => 'coder/default',
      'title' => t('Default'),
      'callback' => 'coder_page',
      'access' => user_access('view code review'),
      'type' => MENU_LOCAL_TASK,
      'weight' => -1,
    );
    $items[] = array(
      'path' => 'coder/core',
      'title' => t('Core'),
      'callback' => 'coder_page',
      'access' => user_access('view code review'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'coder/active',
      'title' => t('Active'),
      'callback' => 'coder_page',
      'access' => user_access('view code review'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'coder/all',
      'title' => t('All'),
      'callback' => 'coder_page',
      'access' => user_access('view code review all'),
      'type' => MENU_LOCAL_TASK,
      'weight' => 1,
    );
    $items[] = array(
      'path' => 'admin/settings/coder',
      'title' => t('Code review'),
      'description' => t('Select code review plugins and modules'),
      'callback' => 'drupal_get_form',
      'callback arguments' => 'coder_admin_settings',
      'access' => user_access('administer site configuration'),
    );
  }
  return $items;
}