function views_plugin_argument_validate_taxonomy_term::options_form in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 7.3 modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc \views_plugin_argument_validate_taxonomy_term::options_form()
Provide the default form for setting options.
Overrides views_plugin_argument_validate::options_form
File
- modules/
taxonomy/ views_plugin_argument_validate_taxonomy_term.inc, line 20 - Contains the 'taxonomy term' argument validator plugin.
Class
- views_plugin_argument_validate_taxonomy_term
- Validate whether an argument is an acceptable node.
Code
function options_form(&$form, &$form_state) {
$vocabularies = taxonomy_get_vocabularies();
$options = array();
foreach ($vocabularies as $voc) {
$options[$voc->vid] = check_plain($voc->name);
}
$form['vids'] = array(
'#type' => 'checkboxes',
'#title' => t('Vocabularies'),
'#options' => $options,
'#default_value' => $this->options['vids'],
'#description' => t('If you wish to validate for specific vocabularies, check them; if none are checked, all terms will pass.'),
);
$form['type'] = array(
'#type' => 'select',
'#title' => t('Argument type'),
'#options' => array(
'tid' => t('Term ID'),
'tids' => t('Term IDs separated by , or +'),
'name' => t('Term name or synonym'),
'convert' => t('Term name/synonym converted to Term ID'),
),
'#default_value' => $this->options['type'],
'#description' => t('Select the form of this argument; if using term name, it is generally more efficient to convert it to a term ID and use Taxonomy: Term ID rather than Taxonomy: Term Name" as an argument.'),
);
$form['transform'] = array(
'#type' => 'checkbox',
'#title' => t('Transform dashes in URL to spaces in term name arguments'),
'#default_value' => $this->options['transform'],
);
}