You are here

function workspace_menu in Workspace 5

Same name and namespace in other branches
  1. 6 workspace.module \workspace_menu()
  2. 7 workspace.module \workspace_menu()

Implementation of hook_menu().

File

./workspace.module, line 21
Presents a user-centric view of content.

Code

function workspace_menu($may_cache) {
  global $user;
  $items = array();
  $access = user_access('access content') && $user->uid > 0;
  if ($may_cache) {
    $items[] = array(
      'path' => 'workspace',
      'title' => t('My workspace'),
      'callback' => 'workspace_admin',
      'access' => $access,
    );
    $items[] = array(
      'path' => 'workspace/list',
      'title' => t('List'),
      'type' => MENU_DEFAULT_LOCAL_TASK,
      'weight' => -10,
    );
    $items[] = array(
      'path' => 'workspace/configure',
      'title' => t('Configure'),
      'callback' => 'workspace_configure',
      'access' => user_access('administer own workspace'),
      'type' => MENU_LOCAL_TASK,
    );
    $items[] = array(
      'path' => 'workspace/delete',
      'title' => t('Delete'),
      'callback' => 'workspace_delete',
      'type' => MENU_CALLBACK,
    );

    //$items[] = array('path' => 'workspace/sharing', 'title' => t('sharing'), 'type' => MENU_LOCAL_TASK);
  }
  return $items;
}