You are here

function efq_views_plugin_query::init in EntityFieldQuery Views Backend 7

Constructor; Create the basic query object and fill with default values.

Overrides views_plugin_query::init

File

./efq_views_plugin_query.inc, line 17

Class

efq_views_plugin_query

Code

function init($base_table, $base_field, $options) {
  parent::init($base_table, $base_field, $options);
  $this->query = new EntityFieldQuery();
  $this->tables = array();

  // An entity type (such as EntityFieldQuery: Node) was selected.
  // We have entity type passed in as base table, prefixed with 'efq_'
  $entity_type = preg_replace('/^efq_/', '', $base_table);
  $this->entity_type = $entity_type;
  $this->query
    ->entityCondition('entity_type', $entity_type);
}