You are here

function hook_workbench_access_node_element_alter in Workbench Access 7

Allows modules to edit the Workbench Access node form element.

This convenience function runs a hook_form_alter() targeted only at the form element defined by Workbench Access.

Parameters

&$element: The form element defined by workbench_access_form_alter(), passed by reference.

&$form_state: The current form state, passed by reference.

$active: The active data information for the access scheme.

See also

workbench_access_get_active_tree()

1 function implements hook_workbench_access_node_element_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

workbench_access_test_workbench_access_node_element_alter in tests/workbench_access_test.module
Implements hook_workbench_access_node_element_alter().

File

./workbench_access.api.php, line 474
API documentation file for Workbench Access.

Code

function hook_workbench_access_node_element_alter(&$element, $form_state, $active) {

  // Always make this element required.
  $element['#required'] = TRUE;
}