function user_relationship_defaults_menu in User Relationships 5
Same name and namespace in other branches
- 5.2 plugins/user_relationship_defaults/user_relationship_defaults.module \user_relationship_defaults_menu()
- 6 user_relationship_defaults/user_relationship_defaults.module \user_relationship_defaults_menu()
- 7 user_relationship_defaults/user_relationship_defaults.module \user_relationship_defaults_menu()
File
- plugins/
user_relationship_defaults/ user_relationship_defaults.module, line 55 - Drupal Module: User Relationship Defaults
Code
function user_relationship_defaults_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/user/relationships/defaults/add',
'title' => t('Add default'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'user_relationship_defaults_add_form',
),
'access' => user_access('administer user relationships'),
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
}
else {
$items[] = array(
'path' => 'admin/user/relationships/defaults/delete',
'title' => t('Delete default'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'user_relationship_defaults_delete_form',
arg(5),
),
'access' => user_access('administer user relationships'),
'type' => MENU_CALLBACK,
);
}
return $items;
}