You are here

function commerce_coupon_entity_property_info_alter in Commerce Coupon 7.2

Same name and namespace in other branches
  1. 7 commerce_coupon.info.inc \commerce_coupon_entity_property_info_alter()

Implements hook_entity_property_info_alter().

File

./commerce_coupon.info.inc, line 10
Entity property info definitions for Commerce Coupon.

Code

function commerce_coupon_entity_property_info_alter(&$info) {
  if (isset($info['commerce_discount'])) {
    $info['commerce_discount']['properties']['coupons'] = array(
      'type' => 'list<commerce_coupon>',
      'label' => t('Coupons'),
      'getter callback' => 'commerce_coupon_get_discount_properties',
    );
    $info['commerce_discount']['properties']['coupon_count'] = array(
      'type' => 'integer',
      'label' => t('Coupon count'),
      'getter callback' => 'commerce_coupon_get_discount_properties',
    );
  }
}