You are here

function activity_menu in Activity 6

Same name and namespace in other branches
  1. 5.4 activity.module \activity_menu()
  2. 5 activity.module \activity_menu()
  3. 5.2 activity.module \activity_menu()
  4. 5.3 activity.module \activity_menu()
  5. 6.2 activity.module \activity_menu()
  6. 7 activity.module \activity_menu()

Implementation of hook_menu().

File

./activity.module, line 22
activity.module

Code

function activity_menu() {
  $items = array();
  global $user;
  $items['activity'] = array(
    'title' => 'Activity',
    'page callback' => 'activity_page',
    'access callback' => 'user_access',
    'access arguments' => array(
      'view public activity',
    ),
    'weight' => 1,
  );
  $items['activity/delete/%activity_aid'] = array(
    'title' => 'Delete activity',
    'page callback' => 'activity_delete',
    'page arguments' => array(
      2,
    ),
    'access callback' => 'activity_delete_access',
    'access arguments' => array(
      2,
    ),
    'type' => MENU_CALLBACK,
  );
  $items['activity/comment/delete/%activity_acid'] = array(
    'title' => 'Delete activity comment',
    'page callback' => 'activity_comment_delete',
    'page arguments' => array(
      3,
    ),
    'access callback' => 'activity_comment_delete_access',
    'access arguments' => array(
      3,
    ),
    'type' => MENU_CALLBACK,
  );
  $items['activity/all'] = array(
    'title' => 'All activity',
    'page callback' => 'activity_page',
    'page arguments' => array(
      'all',
    ),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'access callback' => 'user_access',
    'access arguments' => array(
      'view public activity',
    ),
  );
  $items['activity/mine'] = array(
    'title' => 'My activity',
    'page callback' => 'activity_page',
    'page arguments' => array(
      'mine',
    ),
    'type' => MENU_LOCAL_TASK,
    'access callback' => 'user_access',
    'access arguments' => array(
      'view own activity',
    ),
  );
  $items['activity/all/feed'] = array(
    'title' => 'All activity RSS',
    'page callback' => 'activity_feed',
    'page arguments' => array(
      '' . ACTIVITY_ALL . '',
    ),
    'type' => MENU_CALLBACK,
    'access callback' => 'user_access',
    'access arguments' => array(
      'view public activity',
    ),
  );
  $items['activity/all/json'] = array(
    'title' => 'All activity JSON',
    'page callback' => 'activity_json',
    'page arguments' => array(
      '' . ACTIVITY_ALL . '',
      1,
    ),
    'type' => MENU_CALLBACK,
    'access callback' => 'user_access',
    'access arguments' => array(
      'view public activity',
    ),
  );
  $items['admin/settings/activity'] = array(
    'title' => 'Activity Settings',
    'description' => 'Customize what will display on your users activity page.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'activity_admin_settings',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer activity',
    ),
  );
  $items['admin/settings/activity/%activity_menu'] = array(
    'title callback' => '_activity_menu_title',
    'title arguments' => array(
      3,
    ),
    'description' => 'Customize what will display on your users activity page for this module.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'activity_module_settings',
      3,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'administer activity',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['activity/%user/feed'] = array(
    'title' => 'My activity',
    'page callback' => 'activity_feed',
    'page arguments' => array(
      1,
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'view public activity',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['activity/%user/json'] = array(
    'page callback' => 'activity_json',
    'page arguments' => array(
      1,
      '1',
    ),
    'access callback' => 'user_access',
    'access arguments' => array(
      'view public activity',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}