You are here

function track_da_files_menu in Track da files 7

Same name and namespace in other branches
  1. 8 track_da_files.module \track_da_files_menu()

Implements hook_menu().

File

./track_da_files.module, line 22
This file contains Track da files main functions.

Code

function track_da_files_menu() {
  $items = array();

  // Menu item which calls the tracking function for public files.
  $items['system/tdf'] = array(
    'page callback' => 'track_da_files_tracking',
    'page arguments' => array(
      'public',
    ),
    'access callback' => TRUE,
  );

  // General Report.
  $items['admin/reports/track_da_files'] = array(
    'title' => 'Track da files',
    'description' => 'Tracked files reports',
    'page callback' => 'track_da_files_table',
    'access arguments' => array(
      'access site reports',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'includes/track_da_files.admin.inc',
  );

  // Report for specific file.
  $items['admin/reports/track_da_files/file_report/%/%'] = array(
    'title' => 'File specific report',
    'description' => 'Allow users to see tracking datas for a specific file',
    'page callback' => 'track_da_files_table',
    'page arguments' => array(
      4,
      5,
    ),
    'access arguments' => array(
      'access site reports',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'includes/track_da_files.admin.inc',
  );

  // Report for specific user.
  $items['admin/reports/track_da_files/user_report/%'] = array(
    'title' => 'User specific report',
    'description' => 'Allow users to see tracking datas for a specific user',
    'page callback' => 'track_da_files_table_user_report',
    'page arguments' => array(
      4,
    ),
    'access arguments' => array(
      'access site reports',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'includes/track_da_files.admin.inc',
  );

  // Module configuration.
  $items['admin/config/media/track_da_files'] = array(
    'title' => 'Track da files',
    'description' => 'Provides tracking of displayed files.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'track_da_files_config_form',
    ),
    'access arguments' => array(
      'administer track da files',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'includes/track_da_files.admin.inc',
  );
  return $items;
}