1 views_handler_argument.inc views_handler_argument::summary_basics($count_field = TRUE)

Some basic summary behavior that doesn't need to be repeated as much as code that goes into summary_query()

File

core/modules/views/handlers/views_handler_argument.inc, line 911
@todo.

Class

views_handler_argument
Base class for arguments.

Code

function summary_basics($count_field = TRUE) {
  // Add the number of nodes counter
  $distinct = ($this->view->display_handler->get_option('distinct') && empty($this->query->no_distinct));

  $count_alias = $this->query->add_field($this->query->base_table, $this->query->base_field, 'num_records', 
  array('count' => TRUE, 'distinct' => $distinct));
  $this->query->add_groupby($this->name_alias);

  if ($count_field) {
    $this->query->set_count_field($this->table_alias, $this->real_field);
  }

  $this->count_alias = $count_alias;
}