You are here

public function RestfulDataProviderEFQ::getQueryCount in RESTful 7

Prepare a query for RestfulEntityBase::getTotalCount().

Return value

EntityFieldQuery The EntityFieldQuery object.

Throws

RestfulBadRequestException

Overrides RestfulDataProviderEFQInterface::getQueryCount

1 call to RestfulDataProviderEFQ::getQueryCount()
RestfulEntityBaseNode::getQueryCount in plugins/restful/RestfulEntityBaseNode.php
Overrides RestfulEntityBase::getQueryCount().
1 method overrides RestfulDataProviderEFQ::getQueryCount()
RestfulEntityBaseNode::getQueryCount in plugins/restful/RestfulEntityBaseNode.php
Overrides RestfulEntityBase::getQueryCount().

File

plugins/restful/RestfulDataProviderEFQ.php, line 302
Contains \RestfulDataProviderEFQ

Class

RestfulDataProviderEFQ
@file Contains \RestfulDataProviderEFQ

Code

public function getQueryCount() {
  $query = $this
    ->getEntityFieldQuery();
  if ($path = $this
    ->getPath()) {
    $ids = explode(',', $path);
    $query
      ->entityCondition('entity_id', $ids, 'IN');
  }
  $this
    ->queryForListFilter($query);
  $this
    ->addExtraInfoToQuery($query);
  $query
    ->addTag('restful_count');
  return $query
    ->count();
}