/** * @param array $tokensList * @param string $str * */ public function replaceLinkToken($tokensList, &$str) { foreach ($tokensList as $categories => $tokens) { foreach ($tokens as $token) { $value = ''; if (!empty(self::$_tokens[$categories][$token])) { $value = self::$_tokens[$categories][$token]; if ($categories == 'crmurl') { $value = CRM_Utils_System::url($value, "reset=1", FALSE, NULL, TRUE, TRUE); } } CRM_Utils_Token::token_replace($categories, $token, $value, $str); } } }
/** * Replace welcome/confirmation tokens * * @param string $str The string with tokens to be replaced * @param string $group The name of the group being subscribed * @param boolean $html Replace tokens with html or plain text * @return string The processed string * @access public * @static */ function &replaceWelcomeTokens($str, $group, $html) { if (CRM_Utils_Token::token_match('welcome', 'group', $str)) { CRM_Utils_Token::token_replace('welcome', 'group', $group, $str); } return $str; }