function views_handler_argument::summary_basics
3.x views_handler_argument.inc | views_handler_argument::summary_basics($count_field = TRUE) |
2.x 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()
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 880 - @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;
}