You are here

function commerce_cardonfile_views_data_alter in Commerce Card on File 7.2

Implements hook_views_data_alter().

File

includes/views/commerce_cardonfile.views.inc, line 11
Views integration for Commerce Card on File.

Code

function commerce_cardonfile_views_data_alter(&$data) {

  // Override the data generated by Entity API.
  $data['commerce_cardonfile']['card_number']['field']['handler'] = 'commerce_cardonfile_handler_field_card_number';
  $data['commerce_cardonfile']['instance_default']['filter']['label'] = t('Default');
  $data['commerce_cardonfile']['instance_default']['filter']['type'] = 'yes-no';
  $data['commerce_cardonfile']['label'] = array(
    'field' => array(
      'title' => t('Label'),
      'help' => t('Display the card label.'),
      'handler' => 'commerce_cardonfile_handler_field_card_label',
    ),
  );
  $data['commerce_cardonfile']['card_exp'] = array(
    'field' => array(
      'title' => t('Card expiration'),
      'help' => t('Expiration month and year.'),
      'handler' => 'commerce_cardonfile_handler_field_card_exp',
    ),
  );
  $data['commerce_cardonfile']['operations'] = array(
    'field' => array(
      'title' => t('Operations links'),
      'help' => t('Display all the available operations links for the cards.'),
      'handler' => 'commerce_cardonfile_handler_field_card_operations',
    ),
  );
  return $data;
}