function commerce_registration_rules_action_info in Commerce Registration 7
Same name and namespace in other branches
- 7.3 commerce_registration.rules.inc \commerce_registration_rules_action_info()
- 7.2 commerce_registration.rules.inc \commerce_registration_rules_action_info()
Implements hook_rules_action_info().
File
- ./
commerce_registration.rules.inc, line 111 - Commerce Registration rules file.
Code
function commerce_registration_rules_action_info() {
$actions = array();
$actions['commerce_registration_mark_registrations_paid'] = array(
'label' => t('Mark Commerce Registrations as paid'),
'group' => t('Commerce Registration'),
'parameter' => array(
'commerce_order' => array(
'type' => 'commerce_order',
'label' => t('Commerce Order'),
'description' => t('The Commerce Order to mark all attached registrations as paid.'),
),
),
'callbacks' => array(
'execute' => 'commerce_registration_mark_paid',
),
);
$actions['commerce_registration_cancel_registrations'] = array(
'label' => t('Cancel all Commerce Registrations'),
'group' => t('Commerce Registration'),
'parameter' => array(
'commerce_order' => array(
'type' => 'commerce_order',
'label' => t('Commerce Order'),
'description' => t('The Commerce Order to cancel all attached registrations'),
),
),
'callbacks' => array(
'execute' => 'commerce_registration_cancel_registrations',
),
);
// Waitlist actions
$actions['commerce_registration_move_to_waitlist'] = array(
'label' => t('Move product to waitlist'),
'group' => t('Commerce Registration'),
'parameter' => array(
'commerce_line_item' => array(
'type' => 'commerce_line_item',
'label' => t('Commerce Line Item'),
'description' => t('The Commerce Line Item containing the product to add to the waitlist.'),
),
),
'callbacks' => array(
'execute' => 'commerce_registration_move_to_waitlist',
),
);
$actions['commerce_registration_waitlist_to_cart'] = array(
'label' => t('Move product from waitlist to cart'),
'group' => t('Commerce Registration'),
'parameter' => array(
'commerce_line_item' => array(
'type' => 'commerce_line_item',
'label' => t('Commerce Line Item'),
'description' => t('The Commerce Line Item containing the waitlist product to move back to the cart.'),
),
),
'callbacks' => array(
'execute' => 'commerce_registration_waitlist_to_cart',
),
);
$actions['commerce_registration_delete_line_item'] = array(
'label' => t('Delete the line item'),
'group' => t('Commerce Registration'),
'parameter' => array(
'commerce_line_item' => array(
'type' => 'commerce_line_item',
'label' => t('Commerce Line Item'),
'description' => t('The Commerce Line Item to delete.'),
),
),
'callbacks' => array(
'execute' => 'commerce_registration_delete_line_item',
),
);
return $actions;
}