/**
* Called to add the field to a query.
*/
public function query() { $this->
ensureMyTable();
// Add the field.
$params =
$this->options
['group_type'
] != 'group' ?
['function' =>
$this->options
['group_type'
]] :
[];
$this->field_alias =
$this->query->
addField($this->tableAlias,
$this->realField, NULL,
$params);
$this->
addAdditionalFields();
} /**
* Add 'additional' fields to the query.
*
* @param $fields
* An array of fields. The key is an identifier used to later find the
* field alias used. The value is either a string in which case it's
* assumed to be a field on this handler's table; or it's an array in the
* form of
* @code array('table' => $tablename, 'field' => $fieldname) @endcode
*/