Skip to content

Commit

Permalink
Merge pull request #22897 from demeritcowboy/customview
Browse files Browse the repository at this point in the history
dev/core#3104 - Crash when viewing a contact page - Call to undefined method CRM_Contact_Page_View_Summary::addExpectedSmartyVariables()
  • Loading branch information
demeritcowboy authored Mar 7, 2022
2 parents dedf33a + 5ac3fc4 commit 53bb34e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions CRM/Core/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -519,4 +519,25 @@ public static function crmIcon($icon, $text = NULL, $condition = TRUE, $attribs
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);
}
}

}

0 comments on commit 53bb34e

Please sign in to comment.