You are here

function registration_handler_relationship::query in Entity Registration 8

Same name in this branch
  1. 8 src/registration_handler_relationship.php \Drupal\registration\registration_handler_relationship::query()
  2. 8 modules/registration_views/includes/registration_handler_relationship.inc \registration_handler_relationship::query()
Same name and namespace in other branches
  1. 8.2 modules/registration_views/includes/registration_handler_relationship.inc \registration_handler_relationship::query()
  2. 7.2 modules/registration_views/includes/registration_handler_relationship.inc \registration_handler_relationship::query()
  3. 7 modules/registration_views/includes/registration_handler_relationship.inc \registration_handler_relationship::query()

Called to implement a relationship in a query.

File

modules/registration_views/includes/registration_handler_relationship.inc, line 18
Contains relationship handlers.

Class

registration_handler_relationship
Specialized relationship handler associating registrations and their host entity.

Code

function query() {
  $entity = $this->definition['entity'];
  if (isset($this->definition['table'])) {
    $this->definition['extra'][] = array(
      'table' => $this->definition['table'],
      'field' => 'entity_type',
      'value' => $this->definition['entity'],
    );
  }
  else {
    $this->definition['extra'][] = array(
      'field' => 'entity_type',
      'value' => $this->definition['entity'],
    );
  }
  parent::query();
}