Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function trigger_unassign

Form constructor for confirmation page for removal of an assigned action.

Parameters

$module: The tab of triggers the user will be directed to after successful removal of the action, or if the confirmation form is cancelled.

$hook: The name of the trigger hook, e.g., 'node_insert'.

$aid: The action ID.

See also

trigger_unassign_submit()

Related topics

Form builder functions
Functions that build an abstract representation of a HTML form.
1 string reference to 'trigger_unassign'
trigger_menu in modules/trigger/trigger.module
Implements hook_menu().

File

modules/trigger/trigger.admin.inc, line 55

Code

function trigger_unassign ($form, $form_state, $module, $hook = NULL, $aid = NULL) {
 if (!isset($hook, $aid)) {
 drupal_goto ('admin/structure/trigger');
 }
 $form['hook'] = array(
 '#type' => 'value',
 '#value' => $hook,
 );
 $form['module'] = array(
 '#type' => 'value',
 '#value' => $module,
 );
 $form['aid'] = array(
 '#type' => 'value',
 '#value' => $aid,
 );
 $action = actions_function_lookup ($aid);
 $actions = actions_get_all_actions ();
 $destination = 'admin/structure/trigger/' . $module;
 return confirm_form ($form, t ('Are you sure you want to unassign the action %title?', array(
 '%title' => $actions[$action]['label'],
 )), $destination, t ('You can assign it again later if you wish.'), t ('Unassign'), t ('Cancel'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.