You are here

function commerce_coupon_usage_views_data_alter in Commerce Coupon 7.2

Implements hook_views_data_alter().

File

modules/usage/includes/views/commerce_coupon_usage.views.inc, line 71
Views plugin and data definitions for Commerce Coupon Usage.

Code

function commerce_coupon_usage_views_data_alter(&$data) {
  if (isset($data['commerce_coupon'])) {
    $data['commerce_coupon']['usage_summary_area'] = array(
      'title' => t('Coupon usage summary area'),
      'help' => t('Displays a summary of coupon usage and usage limits; requires a coupon id argument.'),
      'area' => array(
        'handler' => 'commerce_coupon_usage_views_handler_area_usage_summary',
      ),
    );
    $data['commerce_coupon']['usage'] = array(
      'field' => array(
        'title' => t('Coupon usage_summary'),
        'help' => t('Displays a summary of coupon usage and usage limits.'),
        'handler' => 'commerce_coupon_usage_views_handler_field_usage',
      ),
    );
  }
}