function taxonomy_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 'taxonomy_workbench_access_configuration'
- taxonomy_workbench_access_info in modules/
taxonomy.workbench_access.inc - Implements hook_workbench_access_info().
File
- modules/
taxonomy.workbench_access.inc, line 60 - Taxonomy integration for Workbench Access.
Code
function taxonomy_workbench_access_configuration(&$form, &$form_state) {
$options = array();
$vocabularies = taxonomy_get_vocabularies();
foreach ($vocabularies as $vid => $vocabulary) {
$options[$vocabulary->machine_name] = $vocabulary->name;
}
$form['taxonomy_workbench_access_info'] = array(
'#type' => 'fieldset',
'#title' => t('Taxonomy scheme settings'),
'#states' => array(
'visible' => array(
':input[name=workbench_access]' => array(
'value' => 'taxonomy',
),
),
),
);
$form['taxonomy_workbench_access_info']['workbench_access_taxonomy'] = array(
'#type' => 'checkboxes',
'#title' => t('Editorial vocabulary'),
'#description' => t('Select the vocabularies to be used for access control.'),
'#options' => $options,
'#default_value' => variable_get('workbench_access_taxonomy', array()),
'#states' => array(
'visible' => array(
':input[name=workbench_access]' => array(
'value' => 'taxonomy',
),
),
),
);
}