From c7445badbceb4fbc10601b685debfce0232613f4 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 7 Oct 2021 17:11:59 +1300 Subject: [PATCH] Remove function duplicated in error This function lives on & is called on the --- CRM/Contact/Tokens.php | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/CRM/Contact/Tokens.php b/CRM/Contact/Tokens.php index 218b4b3e49..d482c89447 100644 --- a/CRM/Contact/Tokens.php +++ b/CRM/Contact/Tokens.php @@ -226,29 +226,6 @@ class CRM_Contact_Tokens extends CRM_Core_EntityTokens { ]; } - /** - * Interpret the variable `$context['smartyTokenAlias']` (e.g. `mySmartyField' => `tkn_entity.tkn_field`). - * - * We need to ensure that any tokens like `{tkn_entity.tkn_field}` are hydrated, so - * we pretend that they are in use. - * - * @param \Civi\Token\Event\TokenValueEvent $e - */ - public function setupSmartyAliases(TokenValueEvent $e) { - $aliasedTokens = []; - foreach ($e->getRows() as $row) { - $aliasedTokens = array_unique(array_merge($aliasedTokens, - array_values($row->context['smartyTokenAlias'] ?? []))); - } - - $fakeMessage = implode('', array_map(function ($f) { - return '{' . $f . '}'; - }, $aliasedTokens)); - - $proc = $e->getTokenProcessor(); - $proc->addMessage('TokenCompatSubscriber.aliases', $fakeMessage, 'text/plain'); - } - /** * Load token data from legacy hooks. * -- 2.25.1