You are here

public function RegistrationListBuilder::load in RNG - Events and Registrations 8.2

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

Loads entities of this type from storage for listing.

This allows the implementation to manipulate the listing, like filtering or sorting the loaded entities.

Return value

\Drupal\Core\Entity\EntityInterface[] An array of entities implementing \Drupal\Core\Entity\EntityInterface indexed by their IDs. Returns an empty array if no matching entities are found.

Overrides EntityListBuilder::load

File

src/Lists/RegistrationListBuilder.php, line 80

Class

RegistrationListBuilder
Builds a list of registrations.

Namespace

Drupal\rng\Lists

Code

public function load() {
  if (isset($this->event)) {
    return $this->eventManager
      ->getMeta($this->event)
      ->getRegistrations();
  }
  return parent::load();
}