Commit 5d27521b authored by mjpa's avatar mjpa Committed by bojanz

Issue #2980217 by mjpa, bojanz: address_token_info() crashes if Token module is not present

parent 7b4d2349
......@@ -12,6 +12,10 @@ use Drupal\Core\Entity\ContentEntityInterface;
* Implements hook_token_info().
*/
function address_token_info() {
if (!\Drupal::hasService('token.entity_mapper')) {
return;
}
$types = [];
$tokens = [];
foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type_id => $entity_type) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment