1 views_plugin_argument_validate_php.inc views_plugin_argument_validate_php::validate_argument($argument)

Overrides views_plugin_argument_validate::validate_argument

File

core/modules/views/plugins/views_plugin_argument_validate_php.inc, line 46
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->options['code']);
  ob_end_clean();
  return $result;
}