You are here

function uc_roles_rules_event_info in Ubercart 7.3

Implements hook_rules_event_info().

File

uc_roles/uc_roles.rules.inc, line 177
Rules hooks for uc_roles.module.

Code

function uc_roles_rules_event_info() {
  $order = array(
    'type' => 'uc_order',
    'label' => t('Order'),
  );
  $account = array(
    'type' => 'user',
    'label' => t('User'),
  );
  $expiration = array(
    'type' => 'uc_roles_expiration',
    'label' => t('Role expiration'),
  );
  $events['uc_roles_notify_grant'] = array(
    'label' => t('E-mail for granted roles'),
    'group' => t('Notification'),
    'variables' => array(
      'order' => $order,
      'expiration' => $expiration,
    ),
  );
  $events['uc_roles_notify_revoke'] = array(
    'label' => t('E-mail for revoked roles'),
    'group' => t('Notification'),
    'variables' => array(
      'account' => $account,
      'expiration' => $expiration,
    ),
  );
  $events['uc_roles_notify_renew'] = array(
    'label' => t('E-mail for renewed roles'),
    'group' => t('Notification'),
    'variables' => array(
      'order' => $order,
      'expiration' => $expiration,
    ),
  );
  $events['uc_roles_notify_reminder'] = array(
    'label' => t('E-mail for role expiration reminders'),
    'group' => t('Notification'),
    'variables' => array(
      'account' => $account,
      'expiration' => $expiration,
    ),
  );
  return $events;
}