function QueryPluginBase::execute
Same name in other branches
- 9 core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::execute()
- 10 core/modules/views/src/Plugin/views/query/QueryPluginBase.php \Drupal\views\Plugin\views\query\QueryPluginBase::execute()
- 11.x 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
view $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\queryCode
public function execute(ViewExecutable $view) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.