You are here

views_crosstab.module in Views Crosstab 6

Same filename and directory in other branches
  1. 7 views_crosstab.module

File

views_crosstab.module
View source
<?php

/**
 * Implementation of hook_views_api.
 */
function views_crosstab_views_api() {
  return array(
    'api' => 2,
    'path' => drupal_get_path('module', 'views_crosstab'),
  );
}

/**
 * Implementation of hook_views_plugins.
 */
function views_crosstab_views_plugins() {
  $path = drupal_get_path('module', 'views_crosstab');
  $views_path = drupal_get_path('module', 'views');
  require_once "./{$path}/theme.inc";
  $data = array(
    'module' => 'views_crosstab',
    'style' => array(
      'views_crosstab_table' => array(
        'title' => t('Crosstab Table'),
        'help' => t('Creates a crosstab table.'),
        'handler' => 'views_crosstab_table',
        'path' => $path,
        'parent' => 'table',
        'theme' => 'views_view_table',
        'theme file' => 'theme.inc',
        'theme path' => "{$path}",
        'uses row plugin' => FALSE,
        'uses fields' => TRUE,
        'uses options' => TRUE,
        'uses grouping' => FALSE,
        'type' => 'normal',
        'even empty' => FALSE,
      ),
    ),
  );
  return $data;
}

/**
 * Implementation of hook_theme.
 */
function views_crosstab_theme() {
  return array(
    'views_crosstab_ui_table' => array(
      'arguments' => array(
        'form' => NULL,
      ),
      'file' => 'theme.inc',
    ),
  );
}

/**
 * Keep the keys/names of our main field options in one place.
 */
function views_crosstab_field_options() {
  return array(
    'crosstab_rows' => t('Crosstab rows'),
    'crosstab_columns' => t('Crosstab columns'),
    'crosstab_data' => t('Crosstab data'),
  );
}

Functions

Namesort descending Description
views_crosstab_field_options Keep the keys/names of our main field options in one place.
views_crosstab_theme Implementation of hook_theme.
views_crosstab_views_api Implementation of hook_views_api.
views_crosstab_views_plugins Implementation of hook_views_plugins.