You are here

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

Same name and namespace in other branches
  1. 6.3 plugins/views_plugin_argument_default_php.inc \views_plugin_argument_default_php::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_default::convert_options

File

plugins/views_plugin_argument_default_php.inc, line 44
Definition of views_plugin_argument_default_php.

Class

views_plugin_argument_default_php
Default argument plugin to provide a PHP code block.

Code

public function convert_options(&$options) {
  if (!isset($options['code']) && isset($this->argument->options['default_argument_php'])) {
    $options['code'] = $this->argument->options['default_argument_php'];
  }
}