You are here

function commerce_discount_entity_list in Commerce Discount 7

Return an array keyed by commerce discount name and label as value.

2 string references to 'commerce_discount_entity_list'
commerce_discount_rules_action_info in ./commerce_discount.rules.inc
Implements hook_rules_action_info().
commerce_discount_rules_condition_info in ./commerce_discount.rules.inc
Implements hook_rules_condition_info().

File

./commerce_discount.module, line 850
Defines the discount and discount offer entities, bundles and functionality.

Code

function commerce_discount_entity_list() {
  $options = array();
  foreach (entity_load('commerce_discount') as $discount) {
    $options[$discount->name] = $discount->label;
  }
  return $options;
}