class CommerceCouponMetadataController in Commerce Coupon 7.2
Extend the defaults meta data properties for Commerce coupon entity.
Hierarchy
Expanded class hierarchy of CommerceCouponMetadataController
1 string reference to 'CommerceCouponMetadataController'
- commerce_coupon_entity_info in ./
commerce_coupon.module - Implements hook_entity_info().
File
- ./
commerce_coupon.info.inc, line 29 - Entity property info definitions for Commerce Coupon.
View source
class CommerceCouponMetadataController extends EntityDefaultMetadataController {
/**
* Overrides parent::entityPropertyInfo().
*/
public function entityPropertyInfo() {
$info = parent::entityPropertyInfo();
$properties =& $info[$this->type]['properties'];
$properties['status']['type'] = 'boolean';
$schema = drupal_get_schema('commerce_coupon');
foreach ($properties as $name => $property) {
if (isset($schema['fields'][$name])) {
$properties[$name] += array(
'setter callback' => 'entity_property_verbatim_set',
'getter callback' => 'entity_property_verbatim_get',
);
}
}
return $info;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CommerceCouponMetadataController:: |
public | function |
Overrides parent::entityPropertyInfo(). Overrides EntityDefaultMetadataController:: |
|
EntityDefaultMetadataController:: |
protected | property | ||
EntityDefaultMetadataController:: |
public static | function | A options list callback returning all bundles for an entity type. | |
EntityDefaultMetadataController:: |
protected | function | Return a set of properties for an entity based on the schema definition | |
EntityDefaultMetadataController:: |
public | function |