You are here

function uc_roles_ca_condition in Ubercart 6.2

Implements hook_ca_condition().

File

uc_roles/uc_roles.ca.inc, line 468
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_condition() {
  $conditions['uc_roles_condition_role'] = array(
    '#title' => t('Check the role being granted'),
    '#description' => t('Returns TRUE if the role being granted matches any of those specified below.'),
    '#category' => t('Order: Roles'),
    '#callback' => 'uc_roles_condition_role',
    '#arguments' => array(
      'order' => array(
        '#entity' => 'uc_order',
        '#title' => t('Order'),
      ),
      'expiration' => array(
        '#entity' => 'uc_roles_expiration',
        '#title' => t('Role expiration'),
      ),
    ),
  );
  return $conditions;
}