function message_ui_menu in Message UI 7
Implements hook_menu().
File
- ./
message_ui.module, line 92 - Main file for the message UI module.
Code
function message_ui_menu() {
$items = array();
$items['message/%message'] = array(
'title' => 'Viewing a message',
'description' => 'Select a message to create an instance.',
'page callback' => 'message_ui_show_message',
'page arguments' => array(
1,
),
'access callback' => 'message_ui_access_control',
'access arguments' => array(
'view',
1,
),
);
$items['admin/content/message/create'] = array(
'title' => 'Create a new message',
'description' => 'Select a message to create an instance.',
'page callback' => 'message_ui_create_new_message_instance_list',
'access callback' => 'message_ui_access_control',
'access arguments' => array(
'create',
'any',
),
'type' => MENU_LOCAL_ACTION,
'weight' => -10,
);
if ($types = message_ui_get_types()) {
foreach ($types as $type => $title) {
$items['admin/content/message/create/' . str_replace('_', '-', $type)] = array(
'title' => ucfirst(str_replace('_', ' ', $title)),
'description' => 'Create a new message' . $title . ' instance',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'message_ui_instance_message_manage',
$type,
),
'access arguments' => array(
'create',
$type,
),
'access callback' => 'message_ui_access_control',
);
}
}
$items['message/%message/view'] = array(
'title' => 'View',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
'access callback' => 'message_ui_access_control',
'access arguments' => array(
'view',
1,
),
);
$items['message/%message/edit'] = array(
'title' => 'Edit',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'message_ui_instance_message_manage',
1,
),
'access callback' => 'message_ui_access_control',
'access arguments' => array(
'edit',
1,
),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'weight' => 0,
);
$items['message/%message/delete'] = array(
'title' => 'Delete',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'message_ui_instance_delete',
1,
),
'access callback' => 'message_ui_access_control',
'access arguments' => array(
'delete',
1,
),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'weight' => 10,
);
if (module_exists('devel')) {
$items['message/%message/devel'] = array(
'title' => 'Devel',
'page callback' => 'devel_load_object',
'page arguments' => array(
'message',
1,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
'file' => 'devel.pages.inc',
'file path' => drupal_get_path('module', 'devel'),
'weight' => 20,
);
}
$items['admin/config/development/message_delete_multiple'] = array(
'title' => 'Message delete multiple',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'message_ui_delete_multiple_messages',
),
'access callback' => 'message_ui_access_control',
'access arguments' => array(
'delete',
1,
),
);
return $items;
}