You are here

public function GroupListBuilder::load in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/Lists/GroupListBuilder.php \Drupal\rng\Lists\GroupListBuilder::load()
  2. 3.x src/Lists/GroupListBuilder.php \Drupal\rng\Lists\GroupListBuilder::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/GroupListBuilder.php, line 83

Class

GroupListBuilder
Builds a list of registration groups.

Namespace

Drupal\rng\Lists

Code

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