updated language constants and tables
[openemr.git] / library / plugins / compiler.assign.php
blob506083c592d3e071f341288e1384e79442477ac3
1 <?php
3 /**
4 * Smarty {assign} compiler function plugin
6 * Type: compiler function<br>
7 * Name: assign<br>
8 * Purpose: assign a value to a template variable
9 * @link http://smarty.php.net/manual/en/language.custom.functions.php#LANGUAGE.FUNCTION.ASSIGN {assign}
10 * (Smarty online manual)
11 * @param string containing var-attribute and value-attribute
12 * @param Smarty_Compiler
14 function smarty_compiler_assign($tag_attrs, &$compiler)
16 $_params = $compiler->_parse_attrs($tag_attrs);
18 if (!isset($_params['var'])) {
19 $compiler->_syntax_error("assign: missing 'var' parameter", E_USER_WARNING);
20 return;
23 if (!isset($_params['value'])) {
24 $compiler->_syntax_error("assign: missing 'value' parameter", E_USER_WARNING);
25 return;
28 return "\$this->assign({$_params['var']}, {$_params['value']});";
31 /* vim: set expandtab: */