function views_plugin_argument_validate_node::convert_options in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 7.3 modules/node/views_plugin_argument_validate_node.inc \views_plugin_argument_validate_node::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/
node/ views_plugin_argument_validate_node.inc, line 63 - Contains the 'node' argument validator plugin.
Class
- views_plugin_argument_validate_node
- Validate whether an argument is an acceptable node.
Code
function convert_options(&$options) {
if (!isset($options['types']) && !empty($this->argument->options['validate_argument_node_type'])) {
$options['types'] = isset($this->argument->options['validate_argument_node_type']) ? $this->argument->options['validate_argument_node_type'] : array();
$options['access'] = !empty($this->argument->options['validate_argument_node_access']);
$options['access_op'] = isset($this->argument->options['validate_argument_node_access_op']) ? $this->argument->options['validate_argument_node_access_op'] : 'view';
$options['nid_type'] = $this->argument->options['validate_argument_nid_type'];
}
}