public function QueryBase::groupBy

Implements \Drupal\Core\Entity\Query\QueryAggregateInterface::execute().

File

drupal/core/lib/Drupal/Core/Entity/Query/QueryBase.php, line 381
Contains \Drupal\Core\Entity\Query\QueryBase.

Class

QueryBase
The base entity query class.

Namespace

Drupal\Core\Entity\Query

Code

public function groupBy($field, $langcode = NULL) {
  $this->groupBy[] = array(
    'field' => $field,
    'langcode' => $langcode,
  );
  return $this;
}