You are here

public function EventManager::getEventTypes in RNG - Events and Registrations 3.x

Same name and namespace in other branches
  1. 8.2 src/EventManager.php \Drupal\rng\EventManager::getEventTypes()
  2. 8 src/EventManager.php \Drupal\rng\EventManager::getEventTypes()

Get all event types configuration entities.

Return value

array A multidimensional array: [event_entity_type][event_bundle] = $event_type

Overrides EventManagerInterface::getEventTypes

1 call to EventManager::getEventTypes()
EventManager::invalidateEventTypes in src/EventManager.php
Invalidate cache for events types.

File

src/EventManager.php, line 103

Class

EventManager
Event manager for RNG.

Namespace

Drupal\rng

Code

public function getEventTypes() {

  /** @var \Drupal\rng\Entity\EventTypeInterface[] $event_types */
  $entity_type_bundles = [];
  foreach ($this->eventTypeStorage
    ->loadMultiple() as $entity) {
    $entity_type_bundles[$entity
      ->getEventEntityTypeId()][$entity
      ->getEventBundle()] = $entity;
  }
  return $entity_type_bundles;
}