You are here

function uc_roles_token_values in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_roles/uc_roles.module \uc_roles_token_values()

Implements hook_token_values().

File

uc_roles/uc_roles.module, line 591

Code

function uc_roles_token_values($type, $object = NULL) {
  $values = array();
  switch ($type) {
    case 'uc_roles':
      $values['role-expiration-long'] = format_date($object->expiration, 'large');
      $values['role-expiration-medium'] = format_date($object->expiration, 'medium');
      $values['role-expiration-short'] = format_date($object->expiration, 'small');
      $values['role-name'] = check_plain(_uc_roles_get_name($object->rid));
      break;
  }
  return $values;
}