function i18nviews_plugin_argument_validate_i18n_taxonomy_term::options_form in Internationalization Views 7.3
Same name and namespace in other branches
- 6.3 includes/i18nviews_plugin_argument_validate_i18n_taxonomy_term.inc \i18nviews_plugin_argument_validate_i18n_taxonomy_term::options_form()
Provide the default form for setting options.
Overrides views_plugin_argument_validate_taxonomy_term::options_form
File
- includes/
i18nviews_plugin_argument_validate_i18n_taxonomy_term.inc, line 27 - Contains the 'Taxonomy term (i18n)' argument validator plugin.
Class
- i18nviews_plugin_argument_validate_i18n_taxonomy_term
- Validate whether an argument is a localized term.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$options = array();
// Get the localized vocabularies.
foreach (taxonomy_get_vocabularies() as $vocab) {
if (i18n_taxonomy_vocabulary_mode($vocab->vid, I18N_MODE_LOCALIZE)) {
$options[$vocab->machine_name] = check_plain($vocab->name);
}
}
$form['vocabularies']['#description'] = t('Limit this validator to vocabularies that have been localized');
$form['vocabularies']['#options'] = $options;
$form['type']['#options'] = array(
'i18n_tid' => t('Term ID'),
'i18n_tids' => t('Term IDs separated by , or +'),
'i18n_name' => t('Localised Term name or synonym'),
'i18n_convert' => t('Localised Term name/synonym converted to Term ID'),
);
$form['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.');
}