function commerce_coupon_date_rules_condition_info in Commerce Coupon 7.2
Implements hook_rules_condition_info().
File
- modules/
date/ commerce_coupon_date.rules.inc, line 10 - Rules definitions for Commerce Coupon Date.
Code
function commerce_coupon_date_rules_condition_info() {
$inline_conditions = inline_conditions_get_info();
$conditions['commerce_coupon_date_evaluate_date'] = array(
'label' => t('Coupon dates'),
'description' => t('Enter a start and/or end date during which this coupon is valid.'),
'group' => t('Commerce Coupon'),
'parameter' => array(
'commerce_coupon' => array(
'type' => 'commerce_coupon',
'label' => t('Coupon'),
),
'start' => array(
'type' => 'date',
'label' => t('Start date'),
'optional' => TRUE,
),
'end' => array(
'type' => 'date',
'label' => t('End date'),
'optional' => TRUE,
),
),
'callbacks' => array(
'execute' => $inline_conditions['commerce_coupon_date_evaluate_date']['callbacks']['build'],
),
);
return $conditions;
}