function QueryPluginBase::execute

Same name in other branches
  1. 9 core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::execute()
  2. 8.9.x core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::execute()
  3. 11.x core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::execute()

Executes query and fills 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 query and fills associated view object with according values.
Sql::execute in core/modules/views/src/Plugin/views/query/Sql.php
Executes the query and fills associated view object with according values.

File

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

Class

QueryPluginBase
Base plugin class for Views queries.

Namespace

Drupal\views\Plugin\views\query

Code

public function execute(ViewExecutable $view) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.