You are here

function Php::get_argument in Views (for Drupal 7) 8.3

Return the default argument.

This needs to be overridden by every default argument handler to properly do what is needed.

Overrides ArgumentDefaultPluginBase::get_argument

File

lib/Drupal/views/Plugin/views/argument_default/Php.php, line 53
Definition of Drupal\views\Plugin\views\argument_default\Php.

Class

Php
Default argument plugin to provide a PHP code block.

Namespace

Drupal\views\Plugin\views\argument_default

Code

function get_argument() {

  // set up variables to make it easier to reference during the argument.
  $view =& $this->view;
  $argument =& $this->argument;
  ob_start();
  $result = eval($this->options['code']);
  ob_end_clean();
  return $result;
}