You are here

function multifield_menu in Multifield 7

Same name and namespace in other branches
  1. 7.2 multifield.module \multifield_menu()

Implements hook_menu().

File

./multifield.module, line 22

Code

function multifield_menu() {
  $info['admin/structure/multifield'] = array(
    'title' => 'Multifields',
    'description' => 'Create and manage multifields and their subfields.',
    'page callback' => 'multifield_list_page',
    'access arguments' => array(
      'administer multifield',
    ),
    'file' => 'multifield.admin.inc',
  );

  // Disable the add form now that the 'Multifield' field type exists.
  $info['admin/structure/multifield/add'] = array(
    'title' => 'Add multifield',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'multifield_edit_form',
    ),
    'access callback' => FALSE,
    'type' => MENU_LOCAL_ACTION,
    'file' => 'multifield.admin.inc',
  );
  $info['admin/structure/multifield/manage/%multifield'] = array(
    'title' => 'Edit multifield',
    'title callback' => 'multifield_page_title',
    'title arguments' => array(
      4,
    ),
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'multifield_edit_form',
      4,
    ),
    'access callback' => 'multifield_edit_access',
    'access arguments' => array(
      4,
    ),
    'file' => 'multifield.admin.inc',
  );
  $info['admin/structure/multifield/manage/%multifield/edit'] = array(
    'title' => 'Edit',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $info['admin/structure/multifield/manage/%multifield/delete'] = array(
    'title' => 'Delete',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'multifield_delete_form',
      4,
    ),
    'access callback' => 'multifield_edit_access',
    'access arguments' => array(
      4,
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'multifield.admin.inc',
    'weight' => 100,
  );
  $info['multifield/field-remove-item/ajax'] = array(
    'title' => 'Remove item callback',
    'page callback' => 'multifield_field_widget_remove_item_ajax',
    'delivery callback' => 'ajax_deliver',
    'access callback' => TRUE,
    'theme callback' => 'ajax_base_page_theme',
    'type' => MENU_CALLBACK,
    'file' => 'multifield.field.inc',
  );
  return $info;
}