You are here

protected function QueryBase::getAggregationAlias in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/Query/QueryBase.php \Drupal\Core\Entity\Query\QueryBase::getAggregationAlias()

Generates an alias for a field and its aggregated function.

Parameters

string $field: The field name used in the alias.

string $function: The aggregation function used in the alias.

Return value

string The alias for the field.

2 calls to QueryBase::getAggregationAlias()
QueryBase::aggregate in core/lib/Drupal/Core/Entity/Query/QueryBase.php
QueryBase::sortAggregate in core/lib/Drupal/Core/Entity/Query/QueryBase.php

File

core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 463

Class

QueryBase
The base entity query class.

Namespace

Drupal\Core\Entity\Query

Code

protected function getAggregationAlias($field, $function) {
  return strtolower($field . '_' . $function);
}