You are here

views_cumulative_field.views.inc in Views Cumulative Field 8

Same filename and directory in other branches
  1. 7 views_cumulative_field.views.inc

File

views_cumulative_field.views.inc
View source
<?php

/**
 * Implements hook_views_data().
 */
function views_cumulative_field_views_data() {
  $data['views_cumulative_field']['table']['group'] = t('Global');
  $data['views_cumulative_field']['table']['join'] = [
    // Exist in all views.
    '#global' => [],
  ];
  $data['views_cumulative_field']['field_cumulative_field'] = [
    'title' => t('Cumulative Field'),
    'help' => t('Views field that calculates the cumulative value of another field in your view.'),
    'field' => [
      'id' => 'field_cumulative_field',
      // Allow users to specify how precise the results should be. Useful for divisions
      'float' => TRUE,
    ],
  ];
  return $data;
}

Functions