You are here

function forena_menu in Forena Reports 7

Same name and namespace in other branches
  1. 6.2 forena.module \forena_menu()
  2. 6 forena.module \forena_menu()
  3. 7.5 forena.module \forena_menu()
  4. 7.2 forena.module \forena_menu()
  5. 7.3 forena.module \forena_menu()
  6. 7.4 forena.module \forena_menu()

Implementation of hook_menu.

Return value

array

File

./forena.module, line 7

Code

function forena_menu() {
  $items = array();
  $items['admin/config/content/forena'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'forena_settings',
    ),
    'title' => 'Forena Reports',
    'description' => 'Tell Forena where to store report files and how users should access them.',
    'access arguments' => array(
      'administer forena reports',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'forena.admin.inc',
  );
  $items['admin/config/content/forena/general'] = array(
    'title' => 'General',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'file' => 'forena.admin.inc',
    'weight' => -10,
  );
  $items['admin/config/content/forena/formats'] = array(
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'forena_doc_formats_settings',
    ),
    'title' => 'Document Types',
    'access arguments' => array(
      'administer forena reports',
    ),
    'type' => MENU_LOCAL_TASK,
    'file' => 'forena.admin.inc',
  );
  $items['reports/%'] = array(
    'page callback' => 'forena_report',
    'page arguments' => array(
      1,
    ),
    'title' => 'Reports',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'forena.common.inc',
  );
  $items['report_doc/%'] = array(
    'page callback' => 'forena_report',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'forena.common.inc',
  );
  $items['reports/%/view'] = array(
    'title' => 'View',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
    'file' => 'forena.common.inc',
    'access arguments' => array(
      'design any report',
    ),
  );
  $items['reports/%/params'] = array(
    'page callback' => 'forena_admin_params',
    'page arguments' => array(
      1,
    ),
    'title' => 'Params',
    'access arguments' => array(
      'design any report',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  $items['reports/%/layout'] = array(
    'title' => 'Layout',
    'page callback' => 'forena_layout_report',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      'design any report',
    ),
    'description' => 'Edit the layout of your report',
    'type' => MENU_LOCAL_TASK,
    'file' => 'forena.common.inc',
  );
  $items['reports/%/data'] = array(
    'title' => 'Data',
    'page callback' => 'forena_data_block',
    'access arguments' => array(
      'design any report',
    ),
    'description' => 'Add a data block to your report',
    'type' => MENU_LOCAL_TASK,
  );
  $items['reports/%/fields'] = array(
    'title' => 'Fields',
    'page callback' => 'forena_fields_report',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      'design any report',
    ),
    'description' => 'Edit the fields of your report',
    'type' => MENU_LOCAL_TASK,
  );
  $items['reports/%/delete'] = array(
    'title' => 'Delete Report',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'forena_delete_form',
    ),
    'access arguments' => array(
      'delete report',
    ),
    'type' => MENU_NORMAL_ITEM,
    'file' => 'forena.admin.inc',
  );
  $items['reports/add'] = array(
    'title' => 'Add Report',
    'page callback' => 'forena_add_report',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      'create any report',
    ),
    'description' => 'Create a new report',
    'type' => MENU_NORMAL_ITEM,
  );
  $items['forena'] = array(
    'page callback' => 'forena_user_reports',
    'page arguments' => array(),
    'title' => 'My Reports',
    'access arguments' => array(
      'list reports',
    ),
    'type' => MENU_NORMAL_ITEM,
  );
  $items['forena/xml/%'] = array(
    'page callback' => 'forena_block_xml',
    'page arguments' => array(
      2,
    ),
    'access callback' => TRUE,
    'file' => 'forena.common.inc',
    'type' => MENU_CALLBACK,
  );
  $items['forena/fields/format/autocomplete'] = array(
    'page callback' => 'forena_fields_format_autocomplete',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['forena/data_block/autocomplete'] = array(
    'page callback' => 'forena_data_block_autocomplete',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items['forena/categories/autocomplete'] = array(
    'page callback' => 'forena_categories_autocomplete',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  return $items;
}