function trigger_unassign
7.x trigger.admin.inc | trigger_unassign( |
6.x trigger.admin.inc | trigger_unassign($form_state, $hook = NULL, $op = NULL, $aid = NULL) |
Confirm removal of an assigned action.
Parameters
$hook:
$op:
$aid: The action ID.
See also
Related topics
1 string reference to 'trigger_unassign'
- trigger_menu in drupal-6.x/
modules/ trigger/ trigger.module - Implementation of hook_menu().
File
- drupal-6.x/
modules/ trigger/ trigger.admin.inc, line 49 - Admin page callbacks for the trigger module.
Code
function trigger_unassign($form_state, $hook = NULL, $op = NULL, $aid = NULL) {
if (!($hook && $op && $aid)) {
drupal_goto('admin/build/trigger/assign');
}
$form['hook'] = array(
'#type' => 'value',
'#value' => $hook,
);
$form['operation'] = array(
'#type' => 'value',
'#value' => $op,
);
$form['aid'] = array(
'#type' => 'value',
'#value' => $aid,
);
$action = actions_function_lookup($aid);
$actions = actions_get_all_actions();
$destination = 'admin/build/trigger/' . ($hook == 'nodeapi' ? 'node' : $hook);
return confirm_form($form,
t('Are you sure you want to unassign the action %title?', array('%title' => $actions[$action]['description'])),
$destination,
t('You can assign it again later if you wish.'),
t('Unassign'), t('Cancel')
);
}