public function ViewsJsonQuery::query in Views Json Source 8
Same name and namespace in other branches
- 1.x src/Plugin/views/query/ViewsJsonQuery.php \Drupal\views_json_source\Plugin\views\query\ViewsJsonQuery::query()
Generate a query from all of the information supplied to the object.
Parameters
bool $get_count: Provide a countquery if this is true, otherwise provide a normal query.
Overrides QueryPluginBase::query
1 call to ViewsJsonQuery::query()
- ViewsJsonQuery::build in src/
Plugin/ views/ query/ ViewsJsonQuery.php - Builds the necessary info to execute the query.
File
- src/
Plugin/ views/ query/ ViewsJsonQuery.php, line 102
Class
- ViewsJsonQuery
- Base query handler for views_json_source.
Namespace
Drupal\views_json_source\Plugin\views\queryCode
public function query($get_count = FALSE) {
$filters = [];
if (isset($this->filter)) {
foreach ($this->filter as $filter) {
$filters[] = $filter
->generate();
}
}
// @todo Add an option for the filters to be 'and' or 'or'.
return $filters;
}