protected function Formula::summaryQuery

Build the summary query based on a formula

Overrides ArgumentPluginBase::summaryQuery

File

drupal/core/modules/views/lib/Drupal/views/Plugin/views/argument/Formula.php, line 48
Definition of Drupal\views\Plugin\views\argument\Formula.

Class

Formula
Abstract argument handler for simple formulae.

Namespace

Drupal\views\Plugin\views\argument

Code

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
    ->set_count_field(NULL, $formula, $this->field);
  return $this
    ->summaryBasics(FALSE);
}