function views_plugin_argument_validate_php::validate_argument in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 6.3 plugins/views_plugin_argument_validate_php.inc \views_plugin_argument_validate_php::validate_argument()
- 7.3 plugins/views_plugin_argument_validate_php.inc \views_plugin_argument_validate_php::validate_argument()
Overrides views_plugin_argument_validate::validate_argument
File
- plugins/
views_plugin_argument_validate_php.inc, line 36 - Contains the php code argument validator plugin.
Class
- views_plugin_argument_validate_php
- Provide PHP code to validate whether or not an argument is ok.
Code
function validate_argument($argument) {
// set up variables to make it easier to reference during the argument.
$view =& $this->view;
$handler =& $this->argument;
ob_start();
$result = eval($this->argument->options[$this->option_name]);
ob_end_clean();
return $result;
}