mediamosa_server_menu()Implements hook_menu().
sites/all/modules/mediamosa/modules/server/mediamosa_server.module, line 34
<?php
function mediamosa_server_menu() {
$items = array();
$items['admin/mediamosa/config/server'] = array(
'title' => 'Servers',
'description' => 'List all MediaMosa servers.',
'page callback' => '_mediamosa_server_list',
'access arguments' => array('access mediamosa'),
'weight' => mediamosa_settings::UI_TAB_WEIGHT_LIST,
);
$items['admin/mediamosa/config/server/list'] = array(
'title' => 'List',
'access arguments' => array('access mediamosa'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => mediamosa_settings::UI_TAB_WEIGHT_LIST,
);
$server_types = array(
mediamosa_server_db::SERVER_TYPE_DOWNLOAD => t('Download'),
mediamosa_server_db::SERVER_TYPE_STILL => t('Still'),
mediamosa_server_db::SERVER_TYPE_STREAMING => t('Streaming'),
mediamosa_server_db::SERVER_TYPE_JOB_PROCESSOR => t('Processing'),
mediamosa_server_db::SERVER_TYPE_UPLOAD => t('Upload'),
);
$weight = mediamosa_settings::UI_TAB_WEIGHT_ADD;
foreach ($server_types as $server_type => $title) {
$items['admin/mediamosa/config/server/add/' . $server_type] = array(
'title' => 'Add ' . $title,
'page callback' => 'node_add',
'page arguments' => array(mediamosa_node::MEDIAMOSA_NODE_TYPE_SERVER),
'access callback' => 'node_access',
'access arguments' => array('create', mediamosa_node::MEDIAMOSA_NODE_TYPE_SERVER),
'file' => 'node.pages.inc',
'file path' => drupal_get_path('module', 'node'),
'type' => MENU_LOCAL_TASK,
'weight' => $weight++,
);
}
$items['admin/mediamosa/config/server/%node'] = array(
'page callback' => 'node_page_view',
'page arguments' => array(4),
'access callback' => 'node_access',
'access arguments' => array('view', 4),
'type' => MENU_CALLBACK,
);
$items['admin/mediamosa/config/server/%node/view'] = array(
'title' => 'View',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => mediamosa_settings::UI_TAB_WEIGHT_VIEW
);
$items['admin/mediamosa/config/server/%node/edit'] = array(
'title' => 'Edit',
'page callback' => 'node_page_edit',
'page arguments' => array(4),
'access callback' => 'node_access',
'access arguments' => array('update', 4),
'theme callback' => '_node_custom_theme',
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'file' => 'node.pages.inc',
'file path' => drupal_get_path('module', 'node'),
'weight' => mediamosa_settings::UI_TAB_WEIGHT_EDIT,
);
$items['admin/mediamosa/config/server/%node/delete'] = array(
'title' => 'Delete',
'page callback' => 'drupal_get_form',
'page arguments' => array('_mediamosa_node_delete_confirm', 4),
'access callback' => 'node_access',
'access arguments' => array('delete', 4),
'theme callback' => '_node_custom_theme',
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_INLINE,
'file' => 'node.pages.inc',
'file path' => drupal_get_path('module', 'node'),
'weight' => mediamosa_settings::UI_TAB_WEIGHT_DELETE,
);
$items['admin/mediamosa/config/server/%node/revisions'] = array(
'title' => 'Revisions',
'page callback' => '_mediamosa_node_revision_overview',
'page arguments' => array(4),
'access callback' => '_node_revision_access',
'access arguments' => array(4),
'type' => MENU_LOCAL_TASK,
'file' => 'node.pages.inc',
'file path' => drupal_get_path('module', 'node'),
'weight' => mediamosa_settings::UI_TAB_WEIGHT_REVISIONS,
);
return $items;
}
?>