From d9dd678cc4aaff3daf7e29e3b5780ffacaf381fd Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Fri, 25 Nov 2022 15:36:21 +1300 Subject: [PATCH] Remove deprecated token function --- CRM/Utils/Token.php | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/CRM/Utils/Token.php b/CRM/Utils/Token.php index b0c1786022..e0bdae7443 100644 --- a/CRM/Utils/Token.php +++ b/CRM/Utils/Token.php @@ -1592,37 +1592,6 @@ class CRM_Utils_Token { return $str; } - /** - * We have a situation where we are rendering more than one token in each field because we are combining - * tokens from more than one contribution when pdf thank you letters are grouped (CRM-14367) - * - * The replaceContributionToken doesn't handle receive_date correctly in this scenario because of the formatting - * it applies (other tokens are OK including date fields) - * - * So we sort this out & then call the main function. Note that we are not escaping smarty on this fields like the main function - * does - but the fields is already being formatted through a date function - * - * @param string $separator - * @param string $str - * @param array $contributions - * @param array $knownTokens - * - * @deprecated - * - * @return string - */ - public static function replaceMultipleContributionTokens(string $separator, string $str, array $contributions, array $knownTokens): string { - CRM_Core_Error::deprecatedFunctionWarning('no alternative'); - foreach ($knownTokens['contribution'] ?? [] as $token) { - $resolvedTokens = []; - foreach ($contributions as $contribution) { - $resolvedTokens[] = self::replaceContributionTokens('{contribution.' . $token . '}', $contribution, FALSE, $knownTokens); - } - $str = self::token_replace('contribution', $token, implode($separator, $resolvedTokens), $str); - } - return $str; - } - /** * Get replacement strings for any membership tokens (only a small number of tokens are implemnted in the first instance * - this is used by the pdfLetter task from membership search -- 2.25.1