You are here

public function EventMeta::getRegistrants in RNG - Events and Registrations 8.2

Same name and namespace in other branches
  1. 8 src/EventMeta.php \Drupal\rng\EventMeta::getRegistrants()
  2. 3.x src/EventMeta.php \Drupal\rng\EventMeta::getRegistrants()

Get all registrants for this event.

Parameters

string $entity_type_id: The registrant entity type, or NULL to get all.

Return value

\Drupal\rng\Entity\RegistrantInterface[] An array of registrant entities.

Overrides EventMetaInterface::getRegistrants

File

src/EventMeta.php, line 467

Class

EventMeta
Meta event wrapper for RNG.

Namespace

Drupal\rng

Code

public function getRegistrants($entity_type_id = NULL) {
  $query = $this
    ->buildRegistrantQuery($entity_type_id);
  return $this->entityManager
    ->getStorage('registrant')
    ->loadMultiple($query
    ->execute());
}