1 views_plugin_argument_default_taxonomy_tid.inc views_plugin_argument_default_taxonomy_tid::init(&$view, &$argument, $options)

Initialize this plugin with the view and the argument it is linked to.

Overrides views_plugin_argument_default::init

File

core/modules/taxonomy/views/views_plugin_argument_default_taxonomy_tid.inc, line 12
Definition of views_plugin_argument_default_taxonomy_tid.

Class

views_plugin_argument_default_taxonomy_tid
Taxonomy tid default argument.

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;
      }
    }
  }
}