[ Index ] |
PHP Cross Reference of vtigercrm-6.1.0 |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * Smarty plugin 4 * 5 * @package Smarty 6 * @subpackage PluginsModifierCompiler 7 */ 8 9 /** 10 * Smarty default modifier plugin 11 * 12 * Type: modifier<br> 13 * Name: default<br> 14 * Purpose: designate default value for empty variables 15 * 16 * @link http://www.smarty.net/manual/en/language.modifier.default.php default (Smarty online manual) 17 * @author Uwe Tews 18 * @param array $params parameters 19 * @return string with compiled code 20 */ 21 function smarty_modifiercompiler_default ($params, $compiler) 22 { 23 $output = $params[0]; 24 if (!isset($params[1])) { 25 $params[1] = "''"; 26 } 27 28 array_shift($params); 29 foreach ($params as $param) { 30 $output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $param . ' : $tmp)'; 31 } 32 return $output; 33 } 34 35 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:08:37 2014 | Cross-referenced by PHPXref 0.7.1 |