You are here

protected function RestfulDataProviderEFQ::getEntityFieldQuery in RESTful 7

Initialize an EntityFieldQuery (or extending class).

Return value

\EntityFieldQuery The initialized query with the basics filled in.

3 calls to RestfulDataProviderEFQ::getEntityFieldQuery()
RestfulDataProviderEFQ::getQueryCount in plugins/restful/RestfulDataProviderEFQ.php
Prepare a query for RestfulEntityBase::getTotalCount().
RestfulDataProviderEFQ::getQueryForList in plugins/restful/RestfulDataProviderEFQ.php
Prepare a query for RestfulEntityBase::getList().
RestfulEntityBase::getEntityIdByFieldId in plugins/restful/RestfulEntityBase.php
Get the entity ID based on the ID provided in the request.

File

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

Class

RestfulDataProviderEFQ
@file Contains \RestfulDataProviderEFQ

Code

protected function getEntityFieldQuery() {
  $query = $this
    ->EFQObject();
  $entity_type = $this
    ->getEntityType();
  $query
    ->entityCondition('entity_type', $entity_type);
  $entity_info = $this
    ->getEntityInfo();
  if ($this
    ->getBundle() && $entity_info['entity keys']['bundle']) {
    $query
      ->entityCondition('bundle', $this
      ->getBundle());
  }
  return $query;
}