You are here

function workflow_access_priority_form in Workflow 7.2

Implements hook_form().

Add a form to set the weight fo the access module.

1 string reference to 'workflow_access_priority_form'
workflow_access_menu in workflow_access/workflow_access.module
Implements hook_menu().

File

workflow_access/workflow_access.pages.inc, line 12
Provides pages for administrative UI.

Code

function workflow_access_priority_form($form, $form_state) {
  $form['workflow_access'] = array(
    '#type' => 'fieldset',
    '#title' => t('Workflow Access Settings'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['workflow_access']['#tree'] = TRUE;
  $form['workflow_access']['workflow_access_priority'] = array(
    '#type' => 'weight',
    '#delta' => 10,
    '#title' => t('Workflow Access Priority'),
    '#default_value' => variable_get('workflow_access_priority', 0),
    '#description' => t('This sets the node access priority. Changing this
      setting can be dangerous. If there is any doubt, leave it at 0.
      <a href="@url">Read the manual.</a>', array(
      '@url' => url('https://api.drupal.org/api/drupal/modules!node!node.api.php/function/hook_node_access_records/7'),
    )),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Save'),
  );
  return $form;
}