You are here

public function BehaviorInvoker::getPossibleEntityTypeKeys in Rabbit Hole 8

Same name and namespace in other branches
  1. 2.x src/BehaviorInvoker.php \Drupal\rabbit_hole\BehaviorInvoker::getPossibleEntityTypeKeys()

Load a list of entity IDs supported by rabbit hole given available plugins.

Return value

array An array of string entity ids.

Overrides BehaviorInvokerInterface::getPossibleEntityTypeKeys

1 call to BehaviorInvoker::getPossibleEntityTypeKeys()
BehaviorInvoker::getEntity in src/BehaviorInvoker.php
Retrieves entity to apply rabbit hole behavior from event object.

File

src/BehaviorInvoker.php, line 177

Class

BehaviorInvoker
Default implementation of Rabbit Hole behaviors invoker.

Namespace

Drupal\rabbit_hole

Code

public function getPossibleEntityTypeKeys() {
  $entity_type_keys = [];
  foreach ($this->rhEntityPluginManager
    ->getDefinitions() as $def) {
    $entity_type_keys[] = $def['entityType'];
  }
  return $entity_type_keys;
}