You are here

public function RabbitHoleEntityPluginManager::loadEntityTokenMap in Rabbit Hole 8

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

Load a map of tokens per entity type.

Used for behavior plugins that use tokens like PageRedirect.

Return value

array An array of token IDs keyed by entity ID

File

src/Plugin/RabbitHoleEntityPluginManager.php, line 132

Class

RabbitHoleEntityPluginManager
Provides the Rabbit hole entity plugin plugin manager.

Namespace

Drupal\rabbit_hole\Plugin

Code

public function loadEntityTokenMap() {
  $map = [];
  foreach ($this
    ->getDefinitions() as $key => $def) {
    $map += $this
      ->createInstance($key)
      ->getEntityTokenMap();
  }
  return $map;
}