} /**
* Build the summary query based on a string.
*/
protected function summaryQuery() { if (empty($this->definition
['many to one'
])) { $this->
ensureMyTable();
} else { $this->tableAlias =
$this->helper->
summaryJoin();
} if (empty($this->options
['glossary'
])) { // Add the field.
$this->base_alias =
$this->query->
addField($this->tableAlias,
$this->realField
);
$this->query->
setCountField($this->tableAlias,
$this->realField
);
} else { // Add the field.
$formula =
$this->
getFormula();
$this->base_alias =
$this->query->
addField(NULL,
$formula,
$this->field . '_truncated'
);