function uc_recurring_subscription_ca_action in UC Recurring Payments and Subscriptions 7.2
Same name and namespace in other branches
- 6.2 modules/uc_recurring_subscription/uc_recurring_subscription.ca.inc \uc_recurring_subscription_ca_action()
Implementation of hook_ca_action().
File
- modules/
uc_recurring_subscription/ uc_recurring_subscription.ca.inc, line 28
Code
function uc_recurring_subscription_ca_action() {
// actions to grant/revoke role on user account.
$actions['uc_recurring_subscription_grant_role'] = array(
'#title' => t('Grant a role on an order.'),
'#category' => t('Role'),
'#callback' => 'uc_recurring_subscription_action_grant_role',
'#arguments' => array(
'order' => array(
'#entity' => 'uc_order',
'#title' => t('Order'),
),
),
);
$actions['uc_recurring_subscription_revoke_role'] = array(
'#title' => t('Revoke a role on an order.'),
'#category' => t('Role'),
'#callback' => 'uc_recurring_subscription_action_revoke_role',
'#arguments' => array(
'order' => array(
'#entity' => 'uc_order',
'#title' => t('Order'),
),
),
);
if (module_exists('og_actions')) {
// actions to subscribe/unsubscribe user from organic group.
$actions['uc_recurring_subscription_grant_og'] = array(
'#title' => t('Grant organic group membership on order.'),
'#category' => t('Organic Group'),
'#callback' => 'uc_recurring_subscription_action_grant_og',
'#arguments' => array(
'order' => array(
'#entity' => 'uc_order',
'#title' => t('Order'),
),
),
);
$actions['uc_recurring_subscription_revoke_og'] = array(
'#title' => t('Revoke organic group membership on order.'),
'#category' => t('Organic Group'),
'#callback' => 'uc_recurring_subscription_action_revoke_og',
'#arguments' => array(
'order' => array(
'#entity' => 'uc_order',
'#title' => t('Order'),
),
),
);
}
return $actions;
}