function Formula::summaryQuery
Same name in other branches
- 9 core/modules/views/src/Plugin/views/argument/Formula.php \Drupal\views\Plugin\views\argument\Formula::summaryQuery()
- 8.9.x core/modules/views/src/Plugin/views/argument/Formula.php \Drupal\views\Plugin\views\argument\Formula::summaryQuery()
- 11.x core/modules/views/src/Plugin/views/argument/Formula.php \Drupal\views\Plugin\views\argument\Formula::summaryQuery()
Build the summary query based on a formula.
Overrides ArgumentPluginBase::summaryQuery
File
-
core/
modules/ views/ src/ Plugin/ views/ argument/ Formula.php, line 44
Class
- Formula
- Argument handler for simple formulae.
Namespace
Drupal\views\Plugin\views\argumentCode
protected function summaryQuery() {
$this->ensureMyTable();
// Now that our table is secure, get our formula.
$formula = $this->getFormula();
// Add the field.
$this->base_alias = $this->name_alias = $this->query
->addField(NULL, $formula, $this->field);
$this->query
->setCountField(NULL, $formula, $this->field);
return $this->summaryBasics(FALSE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.