do same thing as CRM_Core_Form
authordemeritcowboy <demeritcowboy@hotmail.com>
Mon, 7 Mar 2022 14:25:30 +0000 (09:25 -0500)
committerdemeritcowboy <demeritcowboy@hotmail.com>
Mon, 7 Mar 2022 14:25:30 +0000 (09:25 -0500)
CRM/Core/Page.php

index 7f9e785610f990585dcbd0bdeeedfb050e5db909..76a3e7e26e256d079bd22666405eb2d68fccb816 100644 (file)
@@ -519,4 +519,25 @@ class CRM_Core_Page {
     return "<i$attribString></i>$sr";
   }
 
+  /**
+   * Add an expected smarty variable to the array.
+   *
+   * @param string $elementName
+   */
+  public function addExpectedSmartyVariable(string $elementName): void {
+    $this->expectedSmartyVariables[] = $elementName;
+  }
+
+  /**
+   * Add an expected smarty variable to the array.
+   *
+   * @param array $elementNames
+   */
+  public function addExpectedSmartyVariables(array $elementNames): void {
+    foreach ($elementNames as $elementName) {
+      // Duplicates don't actually matter....
+      $this->addExpectedSmartyVariable($elementName);
+    }
+  }
+
 }