From: demeritcowboy Date: Mon, 7 Mar 2022 14:25:30 +0000 (-0500) Subject: do same thing as CRM_Core_Form X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=5ac3fc4203dd5e95ba59f0f70b1cb394734bd578;p=civicrm-core.git do same thing as CRM_Core_Form --- diff --git a/CRM/Core/Page.php b/CRM/Core/Page.php index 7f9e785610..76a3e7e26e 100644 --- a/CRM/Core/Page.php +++ b/CRM/Core/Page.php @@ -519,4 +519,25 @@ class CRM_Core_Page { return "$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); + } + } + }