Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. QueryAggregate.php

function QueryAggregate::prepare

Same name in this branch
  1. 11.1.x core/lib/Drupal/Core/Entity/Query/Sql/QueryAggregate.php \Drupal\Core\Entity\Query\Sql\QueryAggregate::prepare()

Overrides QueryAggregate::prepare

File

core/modules/workspaces/src/EntityQuery/QueryAggregate.php, line 19

Class

QueryAggregate
Alters aggregate entity queries to use a workspace revision if possible.

Namespace

Drupal\workspaces\EntityQuery

Code

public function prepare() {
    // Aggregate entity queries do not return an array of entity IDs keyed by
    // revision IDs, they only return the values of the aggregated fields, so we
    // don't need to add any expressions like we do in
    // \Drupal\workspaces\EntityQuery\Query::prepare().
    $this->traitPrepare();
    // Throw away the ID fields.
    $this->sqlFields = [];
    return $this;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal