function views_handler_argument::summary_basics
Same name in other branches
- 7.x-3.x handlers/views_handler_argument.inc \views_handler_argument::summary_basics()
Some basic summary behavior that doesn't need to be repeated as much as code that goes into summary_query()
4 calls to views_handler_argument::summary_basics()
- views_handler_argument::summary_query in handlers/
views_handler_argument.inc - Build the info for the summary query.
- views_handler_argument_formula::summary_query in handlers/
views_handler_argument_formula.inc - Build the summary query based on a formula
- views_handler_argument_many_to_one::summary_query in handlers/
views_handler_argument_many_to_one.inc - Build the info for the summary query.
- views_handler_argument_string::summary_query in handlers/
views_handler_argument_string.inc - Build the summary query based on a string
File
-
handlers/
views_handler_argument.inc, line 624
Class
- views_handler_argument
- Base class for arguments.
Code
function summary_basics($count_field = TRUE) {
// Add the number of nodes counter
$field = $this->query->base_table . '.' . $this->query->base_field;
$distinct = $this->view->display_handler
->get_option('distinct') && empty($this->query->no_distinct);
$count_alias = $this->query
->add_field(NULL, $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;
}