-
Notifications
You must be signed in to change notification settings - Fork 3
/
commerce_license_billing.info.inc
64 lines (59 loc) · 1.93 KB
/
commerce_license_billing.info.inc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
* @file
* Provides Entity metadata integration.
*/
class CommerceLicenseBillingCycleMetadataController extends EntityDefaultMetadataController {
/**
* Overrides EntityDefaultMetadataController::entityPropertyInfo().
*/
public function entityPropertyInfo() {
$info = array();
$properties = &$info['cl_billing_cycle']['properties'];
$properties['billing_cycle_id'] = array(
'type' => 'integer',
'label' => t('Billing cycle ID'),
'description' => t('The primary identifier for a billing cycle..'),
'validation callback' => 'entity_metadata_validate_integer_positive',
'schema field' => 'billing_cycle_id',
);
$properties['type'] = array(
'type' => 'token',
'label' => t('Type'),
'description' => t('The billing cycle type.'),
'options list' => 'CommerceLicenseMetadataController::bundleOptionsList',
'setter callback' => 'entity_property_verbatim_set',
'required' => TRUE,
'schema field' => 'type',
);
$properties['owner'] = array(
'type' => 'user',
'label' => t('Owner'),
'description' => t('The owner of the billing cycle.'),
'setter callback' => 'entity_property_verbatim_set',
'required' => TRUE,
'schema field' => 'uid',
);
$properties['status'] = array(
'type' => 'boolean',
'label' => t('Status'),
'description' => t('The billing cycle status.'),
'setter callback' => 'entity_property_verbatim_set',
'required' => TRUE,
'schema field' => 'status',
);
$properties['start'] = array(
'type' => 'date',
'label' => t('Start'),
'description' => t('The date when the billing cycle starts.'),
'schema field' => 'start',
);
$properties['end'] = array(
'type' => 'date',
'label' => t('End'),
'description' => t('The date when the billing cycle ends.'),
'schema field' => 'end',
);
return $info;
}
}