function trigger_assign
trigger_assign($module_to_display = NULL)
Builds a form that allows users to assign actions to triggers.
Parameters
$module_to_display: Which tab of triggers to display. E.g., 'node' for all node-related triggers.
Return value
HTML form.
See also
File
- modules/trigger/trigger.admin.inc, line 20
- Admin page callbacks for the trigger module.
Code
function trigger_assign($module_to_display = NULL) { // If no type is specified we default to node actions, since they // are the most common. if (!isset($module_to_display)) { drupal_goto('admin/structure/trigger/node'); } $build = array(); $trigger_info = module_invoke_all('trigger_info'); drupal_alter('trigger_info', $trigger_info); foreach ($trigger_info as $module => $hooks) { if ($module == $module_to_display) { foreach ($hooks as $hook => $description) { $form_id = 'trigger_' . $hook . '_assign_form'; $build[$form_id] = drupal_get_form($form_id, $module, $hook, $description['label']); } } } return $build; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!trigger!trigger.admin.inc/function/trigger_assign/7.x