You are here

function webform_validation_menu in Webform Validation 7

Same name and namespace in other branches
  1. 6 webform_validation.module \webform_validation_menu()

Implements hook_menu().

File

./webform_validation.module, line 14

Code

function webform_validation_menu() {
  $items = array();
  $items['node/%webform_menu/webform/validation'] = array(
    'title' => 'Form validation',
    'page callback' => 'webform_validation_manage',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'update',
      1,
    ),
    'file' => 'webform_validation.admin.inc',
    'weight' => 3,
    'type' => MENU_LOCAL_TASK,
  );
  $items['node/%webform_menu/webform/validation/add/%'] = array(
    'title' => 'Add validation',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'webform_validation_manage_rule',
      1,
      'add',
      5,
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'update',
      1,
    ),
    'file' => 'webform_validation.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['node/%webform_menu/webform/validation/edit/%/%webform_validation_rule'] = array(
    'title' => 'Edit rule',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'webform_validation_manage_rule',
      1,
      'edit',
      5,
      6,
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'update',
      1,
    ),
    'file' => 'webform_validation.admin.inc',
    'type' => MENU_CALLBACK,
  );
  $items['node/%webform_menu/webform/validation/delete/%webform_validation_rule'] = array(
    'title' => 'Delete rule',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'webform_validation_delete_rule',
      5,
    ),
    'access callback' => 'node_access',
    'access arguments' => array(
      'update',
      1,
    ),
    'file' => 'webform_validation.admin.inc',
    'type' => MENU_CALLBACK,
  );
  return $items;
}