function apply_for_role_action_info_alter in Apply for role 6
Same name and namespace in other branches
- 5 apply_for_role.module \apply_for_role_action_info_alter()
Implementation of hook_action_info_alter().
None of the built-in actions will be enabled for our hook by default. We need to implement hook_action_info_alter() so that we can enable a couple.
File
- ./
apply_for_role.module, line 281 - Allows users to apply for roles.
Code
function apply_for_role_action_info_alter(&$info) {
$actions = array(
'system_message_action',
'system_send_email_action',
'token_actions_message_action',
'token_actions_send_email_action',
'token_actions_goto_action',
);
$ops = array(
'apply',
'approve',
'deny',
'remove',
);
foreach ($actions as $action) {
if (isset($info[$action])) {
$info[$action]['hooks']['apply_for_role'] = $ops;
}
}
}