You are here

function entity_share_ui_client_menu in Entity Share 7

Implements hook_menu().

File

modules/entity_share_ui/modules/entity_share_ui_client/entity_share_ui_client.module, line 42
Entity Share UI Client .module file.

Code

function entity_share_ui_client_menu() {
  $items = array();
  $items['admin/config/entity_share/client'] = array(
    'type' => MENU_NORMAL_ITEM,
    'title' => 'Entity Share Client',
    'description' => 'Configure the endpoints',
    'page callback' => 'entity_share_ui_endpoint_list',
    'access arguments' => array(
      'administer entityshare',
    ),
  );

  // Add a tab for future evolutions.
  $items['admin/config/entity_share/client/endpoint'] = array(
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'title' => 'Endpoints',
  );

  // Endpoints management.
  $items['admin/entity_share/endpoint/%/edit'] = array(
    'page callback' => 'drupal_get_form',
    // 3 for 3rd indice of the path.
    'page arguments' => array(
      'entity_share_ui_endpoint_edit_form',
      3,
    ),
    'access arguments' => array(
      'administer entityshare',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/entity_share/endpoint/add'] = array(
    'title' => 'Add an Endpoint',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'entity_share_ui_endpoint_edit_form',
    ),
    'access arguments' => array(
      'administer entityshare',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/entity_share/endpoint/%/delete'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'entity_share_ui_endpoint_delete_form',
      3,
    ),
    'access arguments' => array(
      'administer entityshare',
    ),
    'type' => MENU_CALLBACK,
  );

  // Technical page for form action.
  $items['admin/content/entity_share'] = array(
    'page callback' => 'entity_share_ui_share_page',
    'page arguments' => array(),
    'access arguments' => array(
      'access share contents',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}