function elasticsearch_connector_menu in Elasticsearch Connector 7.5
Same name and namespace in other branches
- 7 elasticsearch_connector.module \elasticsearch_connector_menu()
- 7.2 elasticsearch_connector.module \elasticsearch_connector_menu()
Implements hook_menu().
File
- ./
elasticsearch_connector.module, line 66 - This module provide an interface to connecting to the elasticsearch cluster and implementing the official Elasticsearch library.
Code
function elasticsearch_connector_menu() {
$items = array();
$settings_path = elasticsearch_connector_main_settings_path();
$items[$settings_path] = array(
'title' => 'Elasticsearch connector',
'description' => 'Administer Elasticsearch connector module',
'position' => 'left',
'access arguments' => array(
'administer elasticsearch connector',
),
'page callback' => 'system_admin_menu_block_page',
'file' => 'system.admin.inc',
'file path' => drupal_get_path('module', 'system'),
);
$items[$settings_path . '/clusters'] = array(
'title' => 'Elasticsearch Clusters',
'description' => 'Showing all available clusters',
'page callback' => 'elasticsearch_connector_status_page',
'access arguments' => array(
'administer elasticsearch connector',
),
'file' => 'elasticsearch_connector.admin.inc',
'weight' => -10,
);
$items[$settings_path . '/clusters/add'] = array(
'title' => 'Add cluster',
'description' => 'Add new elasticsearch cluster',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'elasticsearch_connector_edit_cluster',
),
'access arguments' => array(
'administer elasticsearch connector',
),
'file' => 'elasticsearch_connector.admin.inc',
'type' => MENU_LOCAL_ACTION,
);
$items[$settings_path . '/clusters/%elasticsearch_connector_cluster/edit'] = array(
'title' => 'Edit cluster',
'description' => 'Edit cluster settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'elasticsearch_connector_edit_cluster',
4,
),
'access arguments' => array(
'administer elasticsearch connector',
),
'file' => 'elasticsearch_connector.admin.inc',
'type' => MENU_CALLBACK,
);
$items[$settings_path . '/clusters/%elasticsearch_connector_cluster/info'] = array(
'title' => 'Elasticsearch cluster info',
'description' => 'Elasticsearch cluster info',
'page callback' => 'elasticsearch_connector_info_cluster',
'page arguments' => array(
4,
),
'access arguments' => array(
'administer elasticsearch connector',
),
'file' => 'elasticsearch_connector.admin.inc',
'type' => MENU_CALLBACK,
);
$items[$settings_path . '/clusters/%elasticsearch_connector_cluster/indices'] = array(
'title' => 'Elasticsearch cluster indices',
'description' => 'Elasticsearch cluster indices',
'page callback' => 'elasticsearch_connector_cluster_indices',
'page arguments' => array(
4,
),
'access arguments' => array(
'administer elasticsearch connector',
),
'file' => 'elasticsearch_connector.admin.inc',
);
$items[$settings_path . '/clusters/%elasticsearch_connector_cluster/indices/add'] = array(
'title' => 'Add index',
'description' => 'Add index',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'elasticsearch_connector_cluster_indices_add',
4,
),
'access arguments' => array(
'administer elasticsearch connector',
),
'file' => 'elasticsearch_connector.admin.inc',
'type' => MENU_LOCAL_ACTION,
);
$items[$settings_path . '/clusters/%elasticsearch_connector_cluster/indices/%elasticsearch_connector_index/edit'] = array(
'title' => 'Elasticsearch cluster indices',
'description' => 'Elasticsearch cluster indices',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'elasticsearch_connector_cluster_indices_add',
4,
6,
),
'access arguments' => array(
'administer elasticsearch connector',
),
'load arguments' => array(
'%map',
'%index',
),
'file' => 'elasticsearch_connector.admin.inc',
);
$items[$settings_path . '/clusters/%elasticsearch_connector_cluster/indices/%elasticsearch_connector_index_valid/aliases'] = array(
'title' => 'Elasticsearch cluster indices',
'description' => 'Elasticsearch cluster indices',
'page callback' => 'elasticsearch_connector_cluster_indices_aliases',
'page arguments' => array(
4,
6,
),
'access arguments' => array(
'administer elasticsearch connector',
),
'file' => 'elasticsearch_connector.admin.inc',
);
$items[$settings_path . '/clusters/%elasticsearch_connector_cluster/indices/%elasticsearch_connector_index_valid/delete'] = array(
'title' => 'Elasticsearch cluster indices',
'description' => 'Elasticsearch cluster indices',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'elasticsearch_connector_cluster_indices_delete',
4,
6,
),
'access arguments' => array(
'administer elasticsearch connector',
),
'file' => 'elasticsearch_connector.admin.inc',
);
$items[$settings_path . '/clusters/%elasticsearch_connector_cluster/delete'] = array(
'title' => 'Delete cluster',
'description' => 'Delete cluster settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'elasticsearch_connector_delete_cluster',
4,
),
'access arguments' => array(
'administer elasticsearch connector',
),
'file' => 'elasticsearch_connector.admin.inc',
);
$items['elasticsearch-connector-dialog/redirect/%elasticsearch_connector_cluster/%elasticsearch_connector_index_valid'] = array(
'page callback' => 'elasticsearch_connector_redirect_page',
'page arguments' => array(
2,
3,
),
'access arguments' => array(
'administer elasticsearch connector',
),
);
return $items;
}