You are here

function node_field_menu in Node Field 7.2

Implements hook_menu().

File

./node_field.module, line 21
This module provide ability to add extra fields to any single node.

Code

function node_field_menu() {
  $items = [];
  if (module_exists('node_field_gmap')) {
    $items['admin/config/content/node-field'] = [
      'title' => 'Node field settings',
      'page callback' => 'drupal_get_form',
      'page arguments' => [
        'node_field_admin_settings_form',
      ],
      'access arguments' => [
        'administer modules',
      ],
      'type' => MENU_NORMAL_ITEM,
      'file' => 'includes/pages/node_field.admin.inc',
    ];
  }
  $items['node/%node_field_menu_loader_node/node-field'] = [
    'title' => 'Node fields',
    'page callback' => 'drupal_get_form',
    'page arguments' => [
      'node_field_node_field_form',
      1,
    ],
    'access callback' => 'node_access',
    'access arguments' => [
      'update',
      1,
    ],
    'type' => MENU_LOCAL_TASK,
    'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
    'file' => 'includes/node_field.form.node_field.inc',
  ];
  $items['node/%node_field_menu_loader_node/node-field/%node_field/view'] = [
    'title' => 'Node fields',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 0,
  ];
  $items['node/%node_field_menu_loader_node/node-field/%node_field/edit'] = [
    'title callback' => 'node_field_menu_title_callback',
    'title arguments' => [
      3,
      'edit',
    ],
    'page callback' => 'drupal_get_form',
    'page arguments' => [
      'node_field_node_field_edit_form',
      1,
      3,
    ],
    'access callback' => 'node_access',
    'access arguments' => [
      'update',
      1,
    ],
    'type' => MENU_LOCAL_TASK,
    'file' => 'includes/node_field.form.node_field.inc',
    'weight' => 1,
  ];
  $items['node/%node_field_menu_loader_node/node-field/%node_field/delete'] = [
    'title callback' => 'node_field_menu_title_callback',
    'title arguments' => [
      3,
      'delete',
    ],
    'page callback' => 'drupal_get_form',
    'page arguments' => [
      'node_field_node_field_delete_form',
      1,
      3,
    ],
    'access callback' => 'node_access',
    'access arguments' => [
      'update',
      1,
    ],
    'type' => MENU_LOCAL_TASK,
    'file' => 'includes/node_field.form.node_field.inc',
    'weight' => 2,
  ];
  return $items;
}