function uc_roles_rules_data_info in Ubercart 7.3
Implements hook_rules_data_info().
An entity is defined in order to get role expiration tokens in the email.
File
- uc_roles/
uc_roles.rules.inc, line 13 - Rules hooks for uc_roles.module.
Code
function uc_roles_rules_data_info() {
// CA entity for a role expiration object.
$entities['uc_roles_expiration'] = array(
'label' => t('Ubercart role expiration'),
'wrap' => TRUE,
'token type' => 'uc_role',
'property info' => array(
'reid' => array(
'type' => 'integer',
'label' => t('Role expiration ID'),
'description' => t('Primary key for role expirations.'),
),
'uid' => array(
'type' => 'integer',
'label' => t('User ID'),
'description' => t('The user account ID.'),
),
'user' => array(
'type' => 'user',
'label' => t('User'),
'description' => t('The user account that has the role.'),
'getter callback' => 'uc_roles_get_expiration_properties',
'setter callback' => 'uc_roles_set_expiration_properties',
),
'rid' => array(
'type' => 'integer',
'label' => t('Role ID'),
'description' => t('The granted role.'),
),
'expiration' => array(
'type' => 'date',
'label' => t('Expiration time'),
'description' => t('The time the role will be removed from the user.'),
),
'notified' => array(
'type' => 'boolean',
'label' => t('Notified'),
'description' => t('Indicates the user has been warned that the role will be removed soon.'),
),
),
);
return $entities;
}