You are here

function EntityFieldQuery::build in EntityFieldQuery Views Backend 8

Builds the necessary info to execute the query.

Overrides QueryPluginBase::build

File

src/Plugin/views/query/EntityFieldQuery.php, line 149

Class

EntityFieldQuery
Views query plugin for an SQL query.

Namespace

Drupal\efq_views\Plugin\views\query

Code

function build(&$view) {
  $view
    ->init_pager($view);

  // Let the pager modify the query to add limits.
  $this->pager
    ->query();
  $count_query = clone $this->query;
  $count_query
    ->count(true);
  $view->build_info['efq_query'] = $this->query;
  $view->build_info['count_query'] = $count_query;
}