You are here

function party_plugin_row_attached_entity::query in Party 7

Same name and namespace in other branches
  1. 8.2 includes/views/party_plugin_row_attached_entity.inc \party_plugin_row_attached_entity::query()

Add the fields we need to the query.

Overrides views_plugin_row::query

File

includes/views/party_plugin_row_attached_entity.inc, line 29
Row style plugin for displaying entities attached to a party. This will produce multiple rows per party, and is mostly intended for views which are filtered to a single party, thus showing a list of all of a party's attached entities.

Class

party_plugin_row_attached_entity
Plugin class for displaying party attached entities with entity_view.

Code

function query() {

  // Add the party id.
  $this->field_alias_pid = $this->view->query
    ->add_field('party', 'pid');

  // Add fields from {party_attached_entity} for loading entities.
  $this->field_alias_eid = $this->view->query
    ->add_field('party_attached_entity', 'eid');
  $this->field_alias_entity_type = $this->view->query
    ->add_field('party_attached_entity', 'entity_type');
}