You are here

function coder_review_menu in Coder 7.2

Same name and namespace in other branches
  1. 7 coder_review/coder_review.module \coder_review_menu()

Implements hook_menu().

File

coder_review/coder_review.module, line 59
Developer module to assist with coder reviews and API upgrade suggestions.

Code

function coder_review_menu() {
  $items['admin/config/development/coder/review'] = array(
    'title' => 'Review',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'coder_review_page_form',
    ),
    'access arguments' => array(
      'view code review',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -2,
  );

  // @ignore upgrade6x_1
  foreach (array(
    'select',
    'default',
    'active',
    'core',
    'all',
    'files',
    'patches',
  ) as $delta => $option) {
    $items["admin/config/development/coder/review/{$option}"] = array(
      'title' => drupal_ucfirst($option),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'coder_review_page_form',
        $option,
      ),
      'access arguments' => array(
        'view code review',
      ),
      'type' => $delta ? MENU_LOCAL_TASK : MENU_DEFAULT_LOCAL_TASK,
      'weight' => $delta,
    );
  }
  $items['admin/config/development/coder/review/settings'] = array(
    'title' => 'Settings',
    'description' => 'Select code review plugins and modules',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'coder_review_admin_settings',
    ),
    'access arguments' => array(
      'administer site configuration',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'coder_review.admin.inc',
    'weight' => 9,
  );
  return $items;
}