You are here

function uc_roles_ca_trigger in Ubercart 6.2

Implements hook_ca_trigger().

File

uc_roles/uc_roles.ca.inc, line 233
This file contains the Conditional Actions hooks and functions necessary to make the roles-related entity, conditions, events, and actions work.

Code

function uc_roles_ca_trigger() {
  $order = array(
    '#entity' => 'uc_order',
    '#title' => t('Order'),
  );
  $account = array(
    '#entity' => 'user',
    '#title' => t('User'),
  );
  $expiration = array(
    '#entity' => 'uc_roles_expiration',
    '#title' => t('Role expiration'),
  );
  $triggers['uc_roles_notify_grant'] = array(
    '#title' => t('E-mail for granted roles'),
    '#category' => t('Notification'),
    '#arguments' => array(
      'order' => $order,
      'expiration' => $expiration,
    ),
  );
  $triggers['uc_roles_notify_revoke'] = array(
    '#title' => t('E-mail for revoked roles'),
    '#category' => t('Notification'),
    '#arguments' => array(
      'account' => $account,
      'expiration' => $expiration,
    ),
  );
  $triggers['uc_roles_notify_renew'] = array(
    '#title' => t('E-mail for renewed roles'),
    '#category' => t('Notification'),
    '#arguments' => array(
      'order' => $order,
      'expiration' => $expiration,
    ),
  );
  $triggers['uc_roles_notify_reminder'] = array(
    '#title' => t('E-mail for role expiration reminders'),
    '#category' => t('Notification'),
    '#arguments' => array(
      'account' => $account,
      'expiration' => $expiration,
    ),
  );
  return $triggers;
}