You are here

function commerce_registration_rules_action_info in Commerce Registration 7.3

Same name and namespace in other branches
  1. 7 commerce_registration.rules.inc \commerce_registration_rules_action_info()
  2. 7.2 commerce_registration.rules.inc \commerce_registration_rules_action_info()

Implements hook_rules_action_info().

File

./commerce_registration.rules.inc, line 102
Commerce Registration rules file.

Code

function commerce_registration_rules_action_info() {
  $actions = array();
  $actions['commerce_registration_set_state'] = array(
    'label' => t('Set all Registrations to a specific state'),
    'group' => t('Commerce Registration'),
    'parameter' => array(
      'commerce_line_item' => array(
        'type' => 'commerce_line_item',
        'label' => t('Line item'),
        'description' => t('All registrations on this line item will have their state changed.'),
      ),
      'registration_state' => array(
        'type' => 'list<integer>',
        'label' => t('Registration state'),
        'description' => t('Registrations will be set to this state.'),
        'options list' => 'commerce_registration_get_states',
      ),
    ),
  );
  $actions['commerce_registration_delete_registrations'] = array(
    'label' => t('Delete all registrations on a line item'),
    'group' => t('Commerce Registration'),
    'parameter' => array(
      'commerce_line_item' => array(
        'type' => 'commerce_line_item',
        'label' => t('Commerce line item'),
        'description' => t('All registrations on this line item will be deleted.'),
      ),
    ),
  );
  return $actions;
}