function forena_menu in Forena Reports 7.3
Same name and namespace in other branches
- 6.2 forena.module \forena_menu()
- 6 forena.module \forena_menu()
- 7.5 forena.module \forena_menu()
- 7 forena.module \forena_menu()
- 7.2 forena.module \forena_menu()
- 7.4 forena.module \forena_menu()
Implementation of hook_menu.
Return value
array
File
- ./
forena.module, line 10
Code
function forena_menu() {
$items = array();
// First build menu items.
Frx::Menu()
->addMenuItems($items);
$items['admin/structure/forena'] = array(
'type' => MENU_NORMAL_ITEM,
'title' => 'Forena Reports',
'description' => 'Build reports based on data in your sites databases.',
'page callback' => 'forena_admin_reports',
'access arguments' => array(
'design any report',
),
'file' => 'forena.admin.inc',
);
$items['admin/structure/forena/reports'] = array(
'type' => MENU_DEFAULT_LOCAL_TASK,
'title' => 'Reports',
'description' => 'Build reports based on data in your sites databases.',
'page callback' => 'forena_admin_reports',
'access arguments' => array(
'design any report',
),
'file' => 'forena.admin.inc',
);
$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/data/configure'] = array(
'title' => 'Configure data source',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_data_settings_edit',
),
'type' => MENU_CALLBACK,
'file' => 'forena.admin.inc',
'access arguments' => array(
'administer forena reports',
),
);
$items['admin/config/content/forena/data/add'] = array(
'title' => 'Add data source',
'type' => MENU_CALLBACK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_data_settings_edit',
),
'file' => 'forena.admin.inc',
'access arguments' => array(
'administer forena reports',
),
);
$items['admin/config/content/forena/data'] = array(
'title' => 'Data',
'page callback' => 'forena_data_settings',
'type' => MENU_LOCAL_TASK,
'file' => 'forena.admin.inc',
'access arguments' => array(
'administer forena reports',
),
);
$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/%/edit'] = array(
'title' => 'Edit',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_layout_form',
1,
),
'access arguments' => array(
'design any report',
),
'description' => 'Edit the layout of your report',
'type' => MENU_LOCAL_TASK,
'file' => 'forena.admin.inc',
);
if (module_exists('locale')) {
$items['reports/%/translations'] = array(
'page callback' => 'forena_report_translations',
'page arguments' => array(
1,
),
'title' => 'Translate',
'file' => 'forena.admin.inc',
'access arguments' => array(
'design any report',
),
'type' => MENU_LOCAL_TASK,
);
}
$items['reports/%/edit/params'] = array(
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_admin_params_form',
1,
),
'title' => 'Parameters',
'file' => 'forena.admin.inc',
'access arguments' => array(
'design any report',
),
'type' => MENU_LOCAL_TASK,
);
$items['reports/%/edit/params/add'] = array(
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_add_param_form',
1,
),
'file' => 'forena.admin.inc',
'title' => 'Parameters',
'access arguments' => array(
'design any report',
),
'type' => MENU_CALLBACK,
);
$items['reports/%/edit/layout'] = array(
'title' => 'Layout',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_layout_form',
1,
),
'access arguments' => array(
'design any report',
),
'description' => 'Edit the layout of your report',
'type' => MENU_DEFAULT_LOCAL_TASK,
'file' => 'forena.admin.inc',
);
$items['reports/%/edit/data'] = array(
'title' => 'Data',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_data_block_form',
1,
),
'access arguments' => array(
'design any report',
),
'description' => 'Add a data block to your report',
'file' => 'forena.admin.inc',
'type' => MENU_LOCAL_TASK,
);
$items['reports/%/edit/data/add'] = array(
'title' => 'Data',
'file' => 'forena.admin.inc',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_add_data_block_form',
1,
),
'access arguments' => array(
'design any report',
),
'description' => 'Add a data block to your report',
'type' => MENU_CALLBACK,
);
$items['reports/%/edit/fields'] = array(
'title' => 'Fields',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_fields_form',
1,
),
'access arguments' => array(
'design any report',
),
'description' => 'Edit the fields of your report',
'file' => 'forena.admin.inc',
'type' => MENU_LOCAL_TASK,
);
$items['reports/%/edit/format'] = array(
'title' => 'Format',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_format_form',
1,
),
'access arguments' => array(
'design any report',
),
'file' => 'forena.admin.inc',
'description' => 'Style and document options',
'type' => MENU_LOCAL_TASK,
);
$items['reports/%/delete'] = array(
'title' => 'Delete Report',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_delete_form',
1,
),
'access arguments' => array(
'delete report',
),
'type' => MENU_NORMAL_ITEM,
'file' => 'forena.admin.inc',
);
$items['reports/add'] = array(
'title' => 'Create Report',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_add_report_form',
),
'access arguments' => array(
'create any report',
),
'description' => 'Create a new report',
'file' => 'forena.admin.inc',
'type' => MENU_NORMAL_ITEM,
);
$items['reports/%/add'] = array(
'title' => 'Create Report',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_add_report_form',
1,
),
'access arguments' => array(
'create any report',
),
'description' => 'Create a new report from a template',
'file' => 'forena.admin.inc',
'type' => MENU_CALLBACK,
);
$items['reports/%/translate'] = array(
'title' => 'Translate Report',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'forena_create_trans_form',
1,
),
'access arguments' => array(
'create any report',
),
'description' => 'Create a new report translation',
'file' => 'forena.admin.inc',
'type' => MENU_CALLBACK,
);
$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 arguments' => array(
'access forena block xml',
),
'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/reports/autocomplete'] = array(
'page callback' => 'forena_reports_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;
}