1 views_plugin_argument_validate_taxonomy_term.inc | views_plugin_argument_validate_taxonomy_term::init(&$view, &$argument, $options) |
Initialize this plugin with the view and the argument it is linked to.
Overrides views_plugin_argument_validate::init
File
- core/
modules/ taxonomy/ views/ views_plugin_argument_validate_taxonomy_term.inc, line 11 - Contains the 'taxonomy term' argument validator plugin.
Class
- views_plugin_argument_validate_taxonomy_term
- Validate whether an argument is an acceptable node.
Code
function init(&$view, &$argument, $options) {
parent::init($view, $argument, $options);
// Convert legacy vids option to machine name vocabularies.
if (!empty($this->options['vids'])) {
$vocabularies = taxonomy_vocabulary_load_multiple(FALSE);
foreach ($this->options['vids'] as $vid) {
if (isset($vocabularies[$vid], $vocabularies[$vid]->machine_name)) {
$this->options['vocabularies'][$vocabularies[$vid]->machine_name] = $vocabularies[$vid]->machine_name;
}
}
}
}