Implementation of hook_menu function gmessage_menu Parent item items m

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/**
* Implementation of hook_menu()
*
*/
function gmessage_menu() {
// Parent item
$items['messages'] = array(
'title' => t('Private messages'),
'page callback' => 'gmessage_list',
'access arguments' => array('read gmessages'),
'type' => MENU_NORMAL_ITEM,
);
// List all messages this user received
$items['messages/inbox'] = array(
'title' => t('Inbox'),
'page callback' => 'gmessage_list',
'access arguments' => array('read gmessages'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
// List messages that this user is an author of
$items['messages/sent'] = array(
'title' => t('Sent'),
'page callback' => 'gmessage_list',
'access arguments' => array('read gmessages'),
'type' => MENU_LOCAL_TASK,
'weight' => -8,
);
return $items;
}