public function summaryBasics($count_field = TRUE
) { // Add the number of nodes counter
$distinct =
($this->view->display_handler->
getOption('distinct'
) &&
empty($this->query->no_distinct
));
$count_alias =
$this->query->
addField($this->view->storage->
get('base_table'
),
$this->view->storage->
get('base_field'
), 'num_records',
['count' => TRUE, 'distinct' =>
$distinct]);
$this->query->
addGroupBy($this->name_alias
);
if ($count_field) { $this->query->
setCountField($this->tableAlias,
$this->realField
);
} $this->count_alias =
$count_alias;
} /**
* Sorts the summary based upon the user's selection.
*
* The base variant of this is usually adequate.
*
* @param $order
* The order selected in the UI.
* @param string|null $by
* (optional) This parameter sets the direction for which to order.
* Defaults to NULL.
*/