function ctools_term_settings_form in Chaos Tool Suite (ctools) 6
Same name and namespace in other branches
- 7 plugins/arguments/term.inc \ctools_term_settings_form()
Settings form for the argument
1 string reference to 'ctools_term_settings_form'
File
- plugins/
arguments/ term.inc, line 78 - Plugin to provide an argument handler for a Taxonomy term
Code
function ctools_term_settings_form(&$form, &$form_state, $conf) {
// @todo allow synonym use like Views does.
$form['settings']['input_form'] = array(
'#title' => t('Argument type'),
'#type' => 'radios',
'#options' => array(
'tid' => t('Term ID'),
'term' => t('Term name'),
),
'#default_value' => $conf['input_form'],
'#prefix' => '<div class="clear-block">',
'#suffix' => '</div>',
);
$vocabularies = taxonomy_get_vocabularies();
$options = array();
foreach ($vocabularies as $vid => $vocab) {
$options[$vid] = $vocab->name;
}
$form['settings']['vids'] = array(
'#title' => t('Limit to these vocabularies'),
'#type' => 'checkboxes',
'#options' => $options,
'#default_value' => !empty($conf['vids']) ? $conf['vids'] : array(),
'#description' => t('If no vocabularies are checked, terms from all vocabularies will be accepted.'),
);
$form['settings']['breadcrumb'] = array(
'#title' => t('Inject hierarchy into breadcrumb trail'),
'#type' => 'checkbox',
'#default_value' => !empty($conf['breadcrumb']),
'#description' => t('If checked, taxonomy term parents will appear in the breadcrumb trail.'),
);
}