1 views_handler_argument_string.inc views_handler_argument_string::summary_query()

Build the summary query based on a string

Overrides views_handler_argument::summary_query

File

core/modules/views/handlers/views_handler_argument_string.inc, line 118
Definition of views_handler_argument_string.

Class

views_handler_argument_string
Basic argument handler to implement string arguments that may have length limits.

Code

function summary_query() {
  if (empty($this->definition['many to one'])) {
    $this->ensure_my_table();
  }
  else {
    $this->table_alias = $this->helper->summary_join();
  }

  if (empty($this->options['glossary'])) {
    // Add the field.
    $this->base_alias = $this->query->add_field($this->table_alias, $this->real_field);
    $this->query->set_count_field($this->table_alias, $this->real_field);
  }
  else {
    // Add the field.
    $formula = $this->get_formula();
    $this->base_alias = $this->query->add_field(NULL, $formula, $this->field . '_truncated');
    $this->query->set_count_field(NULL, $formula, $this->field, $this->field . '_truncated');
  }

  $this->summary_name_field();
  return $this->summary_basics(FALSE);
}