class CommerceGCTransactionViewsController in Commerce GC 7
Commerce discount entity Views definitions.
Hierarchy
Expanded class hierarchy of CommerceGCTransactionViewsController
1 string reference to 'CommerceGCTransactionViewsController'
File
- includes/
views/ commerce_gc.views.inc, line 55 - Provides support for the Views module.
View source
class CommerceGCTransactionViewsController extends EntityDefaultViewsController {
/**
* Override EntityDefaultViewsController::views_data().
*/
public function views_data() {
$data = parent::views_data();
$data['commerce_gc_transaction']['table']['base']['access query tag'] = 'commerce_gc_transaction_access';
// Make amount a currency field
$data['commerce_gc_transaction']['amount']['field'] = array(
'handler' => 'commerce_gc_handler_field_amount',
);
$data['commerce_gc_transaction']['date'] = array(
'title' => t('Date'),
'help' => t('The date the transaction occurred.'),
'field' => array(
'handler' => 'views_handler_field_date',
'click sortable' => TRUE,
),
'sort' => array(
'handler' => 'views_handler_sort_date',
),
'filter' => array(
'handler' => 'views_handler_filter_date',
),
);
// Coupon relationship
$data['commerce_gc_transaction']['coupon_id']['relationship'] = array(
'handler' => 'views_handler_relationship',
'base' => 'commerce_coupon',
'field' => 'coupon_id',
'label' => t('Coupon'),
);
// Giftcard balance summary field
$data['commerce_gc_transaction']['delete'] = array(
'field' => array(
'title' => t('Delete transaction link'),
'help' => t('Provides a link to delete a transaction.'),
'handler' => 'commerce_gc_handler_field_transaction_delete',
),
);
return $data;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CommerceGCTransactionViewsController:: |
public | function |
Override EntityDefaultViewsController::views_data(). Overrides EntityDefaultViewsController:: |
|
EntityDefaultViewsController:: |
protected | property | ||
EntityDefaultViewsController:: |
public | function | Determines the handler to use for a relationship to an entity type. | |
EntityDefaultViewsController:: |
protected | function | Comes up with views information based on the given schema and property info. | |
EntityDefaultViewsController:: |
public static | function | A callback returning property options, suitable to be used as views options callback. | |
EntityDefaultViewsController:: |
protected | function | Try to come up with some views fields with the help of the schema and the entity property information. | |
EntityDefaultViewsController:: |
protected | function | Try to come up with some views fields with the help of the revision schema and the entity property information. | |
EntityDefaultViewsController:: |
public | function |