You are here

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

Namesort descending Modifiers Type Description Overrides
CommerceCouponMetadataController::entityPropertyInfo public function Overrides parent::entityPropertyInfo(). Overrides EntityDefaultMetadataController::entityPropertyInfo
EntityDefaultMetadataController::$type protected property
EntityDefaultMetadataController::bundleOptionsList public static function A options list callback returning all bundles for an entity type.
EntityDefaultMetadataController::convertSchema protected function Return a set of properties for an entity based on the schema definition
EntityDefaultMetadataController::__construct public function