function payment_rules_condition_info in Payment 7
Implements hook_rules_condition_info().
File
- ./
payment.rules.inc, line 166 - Rules integration.
Code
function payment_rules_condition_info() {
$conditions['payment_rules_condition_payment_status_is'] = array(
'label' => t('Payment status is'),
'access callback' => 'payment_rules_access',
'parameter' => array(
'payment' => array(
'label' => t('Payment'),
'type' => 'payment',
'restriction' => 'selector',
),
'payment_statuses' => array(
'type' => 'list<text>',
'label' => t('Payment status'),
'options list' => 'payment_status_options',
'restriction' => 'input',
),
),
'group' => t('Payment'),
);
$conditions['payment_rules_condition_payment_status_has_ancestor'] = array(
'label' => t('Payment status is derived from'),
'access callback' => 'payment_rules_access',
'parameter' => array(
'payment' => array(
'label' => t('Payment'),
'type' => 'payment',
'restriction' => 'selector',
),
'payment_statuses' => array(
'type' => 'list<text>',
'label' => t('Payment status is derived from'),
'options list' => 'payment_status_options',
'restriction' => 'input',
),
),
'group' => t('Payment'),
);
$conditions['payment_rules_condition_payment_uses_payment_method'] = array(
'label' => t('Payment uses payment method (deprecated)'),
'access callback' => 'payment_rules_access',
'parameter' => array(
'payment' => array(
'label' => t('Payment'),
'type' => 'payment',
'restriction' => 'selector',
),
'pmids' => array(
'type' => 'list<text>',
'label' => t('Payment methods'),
'options list' => 'payment_method_options',
'restriction' => 'input',
),
),
'group' => t('Payment'),
);
$conditions['payment_rules_condition_payment_method_comparison'] = array(
'label' => t('Payment method is'),
'access callback' => 'payment_rules_access',
'parameter' => array(
'payment_method' => array(
'label' => t('Payment method'),
'type' => 'payment_method',
'restriction' => 'selector',
),
'pmids' => array(
'type' => 'list<text>',
'label' => t('Payment methods'),
'options list' => 'payment_method_options',
'restriction' => 'input',
),
),
'group' => t('Payment'),
);
$conditions['payment_rules_condition_payment_uses_payment_method_type'] = array(
'label' => t('Payment uses payment method of type (deprecated)'),
'access callback' => 'payment_rules_access',
'parameter' => array(
'payment' => array(
'label' => t('Payment'),
'type' => 'payment',
'restriction' => 'selector',
),
'payment_method_controller_class_names' => array(
'type' => 'list<text>',
'label' => t('Payment method types'),
'options list' => 'payment_method_controller_options',
'restriction' => 'input',
),
),
'group' => t('Payment'),
);
$conditions['payment_rules_condition_payment_method_type_comparison'] = array(
'label' => t('Payment method is of type'),
'access callback' => 'payment_rules_access',
'parameter' => array(
'payment_method' => array(
'label' => t('Payment method'),
'type' => 'payment_method',
'restriction' => 'selector',
),
'payment_method_controller_class_names' => array(
'type' => 'list<text>',
'label' => t('Payment method types'),
'options list' => 'payment_method_controller_options',
'restriction' => 'input',
),
),
'group' => t('Payment'),
);
$conditions['payment_rules_condition_payment_method_controller_supports_currency'] = array(
'label' => t('Payment uses payment method of a type that supports currency (deprecated)'),
'access callback' => 'payment_rules_access',
'parameter' => array(
'payment' => array(
'label' => t('Payment'),
'type' => 'payment',
'restriction' => 'selector',
),
'currency' => array(
'type' => 'text',
'label' => t('Currency code'),
),
),
'group' => t('Payment'),
);
$conditions['payment_rules_condition_payment_method_supports_currencies'] = array(
'label' => t('Payment method supports currency'),
'access callback' => 'payment_rules_access',
'parameter' => array(
'payment_method' => array(
'label' => t('Payment method'),
'type' => 'payment_method',
'restriction' => 'selector',
),
'currency' => array(
'type' => 'list<text>',
'label' => t('Currency code'),
),
),
'group' => t('Payment'),
);
$conditions['payment_rules_condition_payment_amount_comparison'] = array(
'label' => t('Payment amount comparison'),
'access callback' => 'payment_rules_access',
'parameter' => array(
'payment' => array(
'label' => t('Payment'),
'type' => 'payment',
'restriction' => 'selector',
),
'operator' => array(
'type' => 'text',
'label' => t('Comparison operator'),
'default value' => '<=',
'options list' => 'payment_numeric_comparison_operator_options',
'restriction' => 'input',
),
'comparison_amount' => array(
'type' => 'decimal',
'label' => t('Amount'),
'default value' => '0',
),
),
'group' => t('Payment'),
);
return $conditions;
}