You are here

function workbench_access_configuration in Workbench Access 7

Defines configuration options for the default access scheme.

See also

workbench_access_workbench_access_info()

1 string reference to 'workbench_access_configuration'
workbench_access_hook_info in ./workbench_access.module
Implements hook_hook_info().

File

./workbench_access.module, line 1193
Workbench Access module file.

Code

function workbench_access_configuration(&$form, &$form_state) {
  $options = array();
  $vocabularies = taxonomy_get_vocabularies();
  foreach ($vocabularies as $vid => $vocabulary) {
    $options[$vid] = $vocabulary->name;
  }
  $form['workbench_access_info'] = array(
    '#type' => 'fieldset',
    '#title' => t('Default scheme settings'),
    '#states' => array(
      'visible' => array(
        ':input[name=workbench_access]' => array(
          'value' => 'workbench_access',
        ),
      ),
    ),
  );
  $form['workbench_access_info']['workbench_access_vid'] = array(
    '#type' => 'radios',
    '#title' => t('Editorial vocabulary'),
    '#description' => t('Select the vocabulary to be used for access control. <strong>Warning: changing this value in production may disrupt your workflow.</strong>'),
    '#options' => $options,
    '#default_value' => variable_get('workbench_access_vid', 0),
    '#states' => array(
      'visible' => array(
        ':input[name=workbench_access]' => array(
          'value' => 'workbench_access',
        ),
      ),
    ),
  );
}