You are here

function Formula::summary_query in Views (for Drupal 7) 8.3

Build the summary query based on a formula

Overrides ArgumentPluginBase::summary_query

File

lib/Drupal/views/Plugin/views/argument/Formula.php, line 49
Definition of Drupal\views\Plugin\views\argument\Formula.

Class

Formula
Abstract argument handler for simple formulae.

Namespace

Drupal\views\Plugin\views\argument

Code

function summary_query() {
  $this
    ->ensureMyTable();

  // Now that our table is secure, get our formula.
  $formula = $this
    ->get_formula();

  // Add the field.
  $this->base_alias = $this->name_alias = $this->query
    ->add_field(NULL, $formula, $this->field);
  $this->query
    ->set_count_field(NULL, $formula, $this->field);
  return $this
    ->summary_basics(FALSE);
}