public function EventMeta::buildQuery in RNG - Events and Registrations 8.2
Same name and namespace in other branches
- 8 src/EventMeta.php \Drupal\rng\EventMeta::buildQuery()
- 3.x src/EventMeta.php \Drupal\rng\EventMeta::buildQuery()
Builds a entity query with conditions referencing this event.
Assumes there is a dynamic_entity_reference field on the entity_type named 'event'.
Parameters
$entity_type: An entity type with an 'event' DER field attached.
Return value
\Drupal\Core\Entity\Query\QueryInterface An entity query.
Overrides EventMetaInterface::buildQuery
3 calls to EventMeta::buildQuery()
- EventMeta::buildGroupQuery in src/
EventMeta.php - Builds a entity query for groups with conditions referencing this event.
- EventMeta::buildRegistrationQuery in src/
EventMeta.php - Builds a entity query for registrations with conditions referencing this event.
- EventMeta::buildRuleQuery in src/
EventMeta.php - Builds a entity query for rules with conditions referencing this event.
File
- src/
EventMeta.php, line 281
Class
- EventMeta
- Meta event wrapper for RNG.
Namespace
Drupal\rngCode
public function buildQuery($entity_type) {
return $this->entityManager
->getStorage($entity_type)
->getQuery('AND')
->condition('event__target_type', $this
->getEvent()
->getEntityTypeId(), '=')
->condition('event__target_id', $this
->getEvent()
->id(), '=');
}