APIv4 - Add Address::getCoordinates action
[civicrm-core.git] / CRM / Core / Page.php
index 81adf5441bf83fab13b4d3890ba785f5d57f1534..76a3e7e26e256d079bd22666405eb2d68fccb816 100644 (file)
@@ -126,6 +126,12 @@ class CRM_Core_Page {
     'breadcrumb',
     'pageTitle',
     'isDeleted',
+    // Required for footer.tpl,
+    // See ExampleHookTest:testPageOutput.
+    'footer_status_severity',
+    // in 'body.tpl
+    'suppressForm',
+    'beginHookFormElements',
   ];
 
   /**
@@ -193,6 +199,8 @@ class CRM_Core_Page {
     $pageTemplateFile = $this->getHookedTemplateFileName();
     self::$_template->assign('tplFile', $pageTemplateFile);
 
+    self::$_template->addExpectedTabHeaderKeys();
+
     // invoke the pagRun hook, CRM-3906
     CRM_Utils_Hook::pageRun($this);
 
@@ -511,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);
+    }
+  }
+
 }