public function RabbitHoleEntityPluginManager::loadEntityTokenMap in Rabbit Hole 2.x
Same name and namespace in other branches
- 8 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\PluginCode
public function loadEntityTokenMap() {
$map = [];
foreach ($this
->getDefinitions() as $key => $def) {
$map += $this
->createInstance($key)
->getEntityTokenMap();
}
return $map;
}