You are here

function EventManager::getEventTypes in RNG - Events and Registrations 8

Same name and namespace in other branches
  1. 8.2 src/EventManager.php \Drupal\rng\EventManager::getEventTypes()
  2. 3.x 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 102

Class

EventManager
Event manager for RNG.

Namespace

Drupal\rng

Code

function getEventTypes() {

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