Merge pull request #21554 from eileenmcnaughton/loop
[civicrm-core.git] / CRM / Upgrade / Incremental / Base.php
index 8e2e8641f7471661bdf3c984ed0ae1bc905de931..355dbcb3def33df199928dcf0e823adc7d22b0e9 100644 (file)
@@ -269,7 +269,7 @@ class CRM_Upgrade_Incremental_Base {
   }
 
   /**
-   * Updated a message token within a template.
+   * Updated a message token within a scheduled reminder.
    *
    * @param CRM_Queue_TaskContext $ctx
    * @param string $old
@@ -284,6 +284,22 @@ class CRM_Upgrade_Incremental_Base {
     return TRUE;
   }
 
+  /**
+   * Updated a message token within a template.
+   *
+   * @param CRM_Queue_TaskContext $ctx
+   * @param string $old
+   * @param string $new
+   * @param $version
+   *
+   * @return bool
+   */
+  public static function updatePrintLabelToken($ctx, string $old, string $new, $version):bool {
+    $messageObj = new CRM_Upgrade_Incremental_MessageTemplates($version);
+    $messageObj->replaceTokenInPrintLabel($old, $new);
+    return TRUE;
+  }
+
   /**
    * Re-save any valid values from contribute settings into the normal setting
    * format.