You are here

function subuser_menu in Subuser 5

Same name and namespace in other branches
  1. 6 subuser.module \subuser_menu()
  2. 7.2 subuser.module \subuser_menu()

Implementation of hook_menu()

File

./subuser.module, line 12

Code

function subuser_menu($may_cache) {
  $items = array();
  $items[] = array(
    'path' => 'admin/settings/subuser',
    'title' => t('Admin settings - Sub User'),
    'description' => t('Admin settings - Sub User'),
    'callback' => 'drupal_get_form',
    'callback arguments' => array(
      'subuser_admin_settings',
    ),
    'access' => user_access('administer subuser'),
  );
  $items[] = array(
    'path' => 'subuser/list',
    'title' => t('My Subusers'),
    'description' => t('My Subusers'),
    'callback' => 'subuser_listall',
    'access' => user_access('manage subuser'),
  );
  $items[] = array(
    'path' => 'subuser/add',
    'title' => t('Add New Sub-User'),
    'description' => t('Add New Sub-User'),
    'callback' => 'drupal_get_form',
    'callback arguments' => array(
      'subuser_add',
    ),
    'access' => user_access('manage subuser'),
  );
  $items[] = array(
    'path' => 'subuser/' . arg(1) . '/add',
    'title' => t('Edit Subuser'),
    'description' => t('Edit Subuser'),
    'callback' => 'subuser_edit',
    'callback arguments' => arg(1),
    'access' => user_access('manage subuser'),
  );
  $items[] = array(
    'path' => 'subuser/' . arg(1) . '/delete',
    'title' => t('Edit Subuser'),
    'description' => t('Edit Subuser'),
    'callback' => 'subuser_delete',
    'callback arguments' => arg(1),
    'access' => user_access('manage subuser'),
  );
  return $items;
}