function commerce_coupon_entity_info_alter in Commerce Coupon 7.2
Same name and namespace in other branches
- 7 commerce_coupon.module \commerce_coupon_entity_info_alter()
Implements hook_entity_info_alter().
File
- ./
commerce_coupon.module, line 51 - Provides coupon functionality for Drupal Commerce.
Code
function commerce_coupon_entity_info_alter(&$entity_info) {
// Expose the admin UI for coupon fields.
foreach (commerce_coupon_get_types() as $type => $info) {
$entity_info['commerce_coupon']['bundles'][$type] = array(
'admin' => array(
'path' => 'admin/commerce/coupons/types/' . strtr($type, '_', '-'),
'access arguments' => array(
'administer coupon types',
),
),
'label' => $info['label'],
);
}
}