You are here

public function TcaPluginManager::loadEntityTokenMap in Token Content Access 8

Same name and namespace in other branches
  1. 2.0.x src/Plugin/TcaPluginManager.php \Drupal\tca\Plugin\TcaPluginManager::loadEntityTokenMap()

Load a map of tokens per entity type.

Used for TCA plugins that use tokens like PageRedirect.

Return value

array An array of token IDs keyed by entity ID

File

src/Plugin/TcaPluginManager.php, line 130

Class

TcaPluginManager
Provides the TCA plugin manager.

Namespace

Drupal\tca\Plugin

Code

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