You are here

function ViewsPhp::query in Views PHP 8

Same name in this branch
  1. 8 src/Plugin/views/filter/ViewsPhp.php \Drupal\views_php\Plugin\views\filter\ViewsPhp::query()
  2. 8 src/Plugin/views/sort/ViewsPhp.php \Drupal\views_php\Plugin\views\sort\ViewsPhp::query()
  3. 8 src/Plugin/views/field/ViewsPhp.php \Drupal\views_php\Plugin\views\field\ViewsPhp::query()

Add this filter to the query.

Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.

Overrides FilterPluginBase::query

File

src/Plugin/views/filter/ViewsPhp.php, line 74
Contains \Drupal\views_php\Plugin\views\filter\ViewsPhp.

Class

ViewsPhp
A handler to filter a view using PHP defined by the administrator.

Namespace

Drupal\views_php\Plugin\views\filter

Code

function query() {

  // Inform views_php_views_pre_execute() to seize control over the query.
  $this->view->views_php = TRUE;
}