function referral_rules_action_info in User Referral 7
Implements hook_rules_action_info().
File
- ./
referral.rules.inc, line 10 - Rules integration
Code
function referral_rules_action_info() {
$actions = array();
$actions['flag_referral'] = array(
'label' => t('Flag referral'),
'group' => t('user referral'),
'base' => 'rules_action_flag_referral',
'parameter' => array(
'user' => array(
'type' => 'user',
'label' => t('The user whose referral record you want to flag'),
),
),
);
$actions['unflag_referral'] = array(
'label' => t('Unflag referral'),
'group' => t('user referral'),
'base' => 'rules_action_unflag_referral',
'parameter' => array(
'user' => array(
'type' => 'user',
'label' => t('The user whose referral record you want to unflag'),
),
),
);
$actions['change_referral'] = array(
'label' => t('Change referral for user'),
'group' => t('user referral'),
'base' => 'rules_action_change_referral',
'parameter' => array(
'target_user' => array(
'type' => 'user',
'label' => t('Target user'),
'description' => t('The user you want to change the referral record for'),
),
'referring_user' => array(
'type' => 'user',
'label' => t('New referring user'),
'description' => t('The user you want to say referred the target user'),
),
),
);
$actions['new_referral'] = array(
'label' => t('Set new referral for user'),
'group' => t('user referral'),
'base' => 'rules_action_new_referral',
'parameter' => array(
'target_user' => array(
'type' => 'user',
'label' => t('Target user'),
'description' => t('The user you want to set the new referral record for'),
),
'referring_user' => array(
'type' => 'user',
'label' => t('New referring user'),
'description' => t('The user you want to say referred the target user'),
),
'host' => array(
'type' => 'text',
'label' => t('Host'),
'description' => t('The host you to say the new user came from'),
'optional' => TRUE,
),
'uri' => array(
'type' => 'text',
'label' => t('URI'),
'description' => t('The URI you want to say the new user came from'),
'optional' => TRUE,
),
),
);
$actions['fetch_referring_user'] = array(
'label' => t('Fetch referring user'),
'group' => t('user referral'),
'base' => 'rules_action_fetch_referring_user',
'parameter' => array(
'user' => array(
'type' => 'user',
'label' => t('The user whose referring user you want to fetch.'),
),
),
'provides' => array(
'referring_user' => array(
'type' => 'user',
'label' => t('The referring user'),
),
),
);
return $actions;
}