You are here

function workspace_menu in Workspace 6

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

Implementation of hook_menu().

File

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

Code

function workspace_menu() {
  $items['workspace/%user_uid_optional'] = array(
    'title' => 'My workspace',
    'page callback' => 'workspace_list_content',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'workspace_access',
    'access arguments' => array(
      1,
    ),
    'weight' => -10,
  );
  $items['workspace/%user/content'] = array(
    'title' => 'Content',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'page callback' => 'workspace_list_content',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'workspace_access',
    'access arguments' => array(
      1,
    ),
    'weight' => 10,
  );
  $items['workspace/%user/comments'] = array(
    'title' => 'Comments',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'workspace_list_comments',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'workspace_access',
    'access arguments' => array(
      1,
      module_exists('comment'),
    ),
    'weight' => 20,
  );
  $items['workspace/%user/attachments'] = array(
    'title' => 'Attachments',
    'type' => MENU_LOCAL_TASK,
    'page callback' => 'workspace_list_files',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'workspace_access',
    'access arguments' => array(
      1,
      module_exists('upload'),
    ),
    'weight' => 30,
  );
  $items['workspace/%user/configure'] = array(
    'title' => 'Configure',
    'page callback' => 'workspace_configure',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'workspace_configure_access',
    'access arguments' => array(
      1,
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 50,
  );
  $items['admin/settings/workspace'] = array(
    'title' => 'Workspace',
    'description' => 'Customize workspace behavior.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'workspace_settings',
    ),
    'access arguments' => array(
      'administer workspaces',
    ),
  );

  // In this entry, 'access content' permission may seem liberal
  // but since workspace_delete() simply redirects to
  // node/*/delete deletion permissions will be applied there.
  $items['workspace/delete'] = array(
    'title' => 'Delete',
    'page callback' => 'workspace_delete',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}