You are here

public function QueryPluginBase::execute in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::execute()

Executes the query and fills the associated view object with according values.

Values to set: $view->result, $view->total_rows, $view->execute_time, $view->pager['current_page'].

$view->result should contain an array of objects. The array must use a numeric index starting at 0.

Parameters

\Drupal\views\ViewExecutable $view: The view which is executed.

2 methods override QueryPluginBase::execute()
QueryTest::execute in core/modules/views/tests/modules/views_test_data/src/Plugin/views/query/QueryTest.php
Executes the query and fills the associated view object with according values.
Sql::execute in core/modules/views/src/Plugin/views/query/Sql.php
Executes the query and fills the associated view object with according values.

File

core/modules/views/src/Plugin/views/query/QueryPluginBase.php, line 88

Class

QueryPluginBase
Base plugin class for Views queries.

Namespace

Drupal\views\Plugin\views\query

Code

public function execute(ViewExecutable $view) {
}