function workbench_access_alter_form in Workbench Access 7
Call the alter hook for the active schema.
2 calls to workbench_access_alter_form()
- workbench_access_form_alter in ./
workbench_access.module - Implements hook_form_alter().
- workbench_access_node_form_element in ./
workbench_access.module - Provides a module-specific form for access control.
File
- ./
workbench_access.module, line 1459 - Workbench Access module file.
Code
function workbench_access_alter_form($hook, &$form, &$form_state) {
$active = workbench_access_get_active_tree();
// Determine the proper field to edit.
$function = $active['access_scheme']['access_type'] . '_' . 'workbench_access_' . $hook . '_alter';
// We don't do a module_invoke or drupal_alter() here so we can target just the active scheme.
if (function_exists($function)) {
$function($form, $form_state, $active);
}
// Now let other modules act.
drupal_alter('workbench_access_' . $hook, $form, $form_state, $active);
}