9 * Smarty {assign_debug_info} function plugin
12 * Name: assign_debug_info<br>
13 * Purpose: assign debug info to the template<br>
14 * @author Monte Ohrt <monte at ohrt dot com>
15 * @param array unused in this plugin, this plugin uses {@link Smarty::$_config},
16 * {@link Smarty::$_tpl_vars} and {@link Smarty::$_smarty_debug_info}
19 function smarty_function_assign_debug_info($params, &$smarty)
21 $assigned_vars = $smarty->_tpl_vars
;
22 ksort($assigned_vars);
23 if (@is_array
($smarty->_config
[0])) {
24 $config_vars = $smarty->_config
[0];
26 $smarty->assign("_debug_config_keys", array_keys($config_vars));
27 $smarty->assign("_debug_config_vals", array_values($config_vars));
30 $included_templates = $smarty->_smarty_debug_info
;
32 $smarty->assign("_debug_keys", array_keys($assigned_vars));
33 $smarty->assign("_debug_vals", array_values($assigned_vars));
35 $smarty->assign("_debug_tpls", $included_templates);
38 /* vim: set expandtab: */
This page took 0.456443 seconds and 4 git commands to generate.