function i18nviews_plugin_argument_validate_i18n_taxonomy_term::options_form in Internationalization Views 6.3
Same name and namespace in other branches
- 7.3 includes/i18nviews_plugin_argument_validate_i18n_taxonomy_term.inc \i18nviews_plugin_argument_validate_i18n_taxonomy_term::options_form()
File
- includes/
i18nviews_plugin_argument_validate_i18n_taxonomy_term.inc, line 26 - 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);
$vocabularies = taxonomy_get_vocabularies();
$options = array();
// Get the localized vocabularies.
$localisedvocabs = variable_get('i18ntaxonomy_vocabulary', array());
// Only add the localized vocabularies as options.
foreach ($localisedvocabs as $localisedvocab => $localisedtype) {
if ($localisedtype == '1') {
$options[$localisedvocab] = check_plain($vocabularies[$localisedvocab]->name);
}
}
$form['vids']['#description'] = t('Limit this validator to vocabularies that have been localized');
$form['vids']['#options'] = $options;
$form['type']['#options'] = array(
'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.');
}