You are here

public function views_plugin_argument_validate_taxonomy_term::convert_options in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc \views_plugin_argument_validate_taxonomy_term::convert_options()

Convert options from the older style.

In Views 3, the method of storing default argument options has changed and each plugin now gets its own silo. This method can be used to move arguments from the old style to the new style. See views_plugin_argument_default_fixed for a good example of this method.

Overrides views_plugin_argument_validate::convert_options

File

modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc, line 93
Definition of views_plugin_argument_validate_taxonomy_term.

Class

views_plugin_argument_validate_taxonomy_term
Validate whether an argument is an acceptable node.

Code

public function convert_options(&$options) {
  if (!isset($options['vocabularies']) && !empty($this->argument->options['validate_argument_vocabulary'])) {
    $options['vocabularies'] = $this->argument->options['validate_argument_vocabulary'];
    $options['type'] = $this->argument->options['validate_argument_type'];
    $options['transform'] = isset($this->argument->options['validate_argument_transform']) ? $this->argument->options['validate_argument_transform'] : FALSE;
  }
}