CRM-21472 - Allow FlexMailer to overload getRequiredTokens() - Comments
[civicrm-core.git] / CRM / Utils / Token.php
index e58c3b6ce74a8534dba568d8c567a7c2c9a6e8d2..5b5b358c4f38909ed97766006d4a54f78c7db8ba 100644 (file)
@@ -118,6 +118,7 @@ class CRM_Utils_Token {
    *    else an array of the missing tokens
    */
   public static function requiredTokens(&$str) {
+    // FlexMailer is a refactoring of CiviMail which provides new hooks/APIs/docs. If the sysadmin has opted to enable it, then use that instead of CiviMail.
     $requiredTokens = defined('CIVICRM_FLEXMAILER_HACK_REQUIRED_TOKENS') ? Civi\Core\Resolver::singleton()->call(CIVICRM_FLEXMAILER_HACK_REQUIRED_TOKENS, array()) : CRM_Utils_Token::getRequiredTokens();
 
     $missing = array();