*
* @package CRM
* @copyright CiviCRM LLC https://civicrm.org/licensing
- * $Id$
- *
*/
/**
/**
* Temporarily assign a list of variables.
*
- * @code
+ * ```
* $smarty->pushScope(array(
* 'first_name' => 'Alice',
* 'last_name' => 'roberts',
* ));
* $html = $smarty->fetch('view-contact.tpl');
* $smarty->popScope();
- * @endcode
+ * ```
*
* @param array $vars
* (string $name => mixed $value).
$oldVars = $this->get_template_vars();
$backupFrame = [];
foreach ($vars as $key => $value) {
- $backupFrame[$key] = isset($oldVars[$key]) ? $oldVars[$key] : NULL;
+ $backupFrame[$key] = $oldVars[$key] ?? NULL;
}
$this->backupFrames[] = $backupFrame;