You are here

function views_calc_menu in Views Calc 7

Same name and namespace in other branches
  1. 5 views_calc.module \views_calc_menu()
  2. 6.3 views_calc.module \views_calc_menu()
  3. 6 views_calc.module \views_calc_menu()

Implements hook_menu().

File

./views_calc.module, line 116
This module will allow you to add calculated fields to views tables and compute (SUM, COUNT, AVG, etc) columns of numeric data in a views table.

Code

function views_calc_menu() {
  $items = array();
  $items['admin/structure/views_calc'] = array(
    'title' => t('Views Calc'),
    'description' => t('Set Views Calc fields and columns.'),
    'type' => MENU_NORMAL_ITEM,
    'weight' => 10,
    'priority' => 1,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'views_calc_fields_form',
    ),
    'access arguments' => array(
      'create views calc',
    ),
  );
  $items['admin/structure/views_calc/fields'] = array(
    'title' => t('Fields'),
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 5,
    'priority' => 1,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'views_calc_fields_form',
    ),
    'access arguments' => array(
      'create views calc',
    ),
  );
  $items['admin/structure/views_calc/settings'] = array(
    'title' => t('Settings'),
    'type' => MENU_LOCAL_TASK,
    'weight' => 6,
    'priority' => 1,
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'views_calc_settings_form',
    ),
    'access arguments' => array(
      'administer views calc',
    ),
  );
  $items['admin/structure/views_calc/export'] = array(
    'title' => 'Export fields',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'views_calc_export_form',
    ),
    'access arguments' => array(
      'create views calc',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 7,
  );
  $items['admin/structure/views_calc/import'] = array(
    'title' => 'Import fields',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'views_calc_import_form',
    ),
    'access arguments' => array(
      'create views calc',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 8,
  );
  return $items;
}