/[drupal]/contributions/theme-engines/smarty/plugins/function.set_null.php
ViewVC logotype

Contents of /contributions/theme-engines/smarty/plugins/function.set_null.php

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Sat Dec 31 09:24:02 2005 UTC (3 years, 10 months ago) by tclineks
Branch: MAIN
CVS Tags: DRUPAL-6--2-0, DRUPAL-5--0-1, HEAD
Branch point for: DRUPAL-5, DRUPAL-4-7
Changes since 1.1: +1 -1 lines
File MIME type: text/x-php
Moving 4.6 branch updates over to HEAD
1 <?php
2 // $Id: function.set_null.php,v 1.1 2005/08/21 20:06:23 tclineks Exp $
3
4 /**
5 * set_null Plugin
6 *
7 * Smarty function plugin to allow setting template variable to null
8 *
9 * Examples:
10 * {set_null var="var_name"}
11 *
12 * @version 0.1
13 * @author Travis Cline <travis dot cline at gmail dot com>
14 * @param array
15 * @param Smarty
16 * @return string
17 */
18
19 function smarty_function_set_null($params, &$smarty)
20 {
21 if (!isset($params['var'])) {
22 $smarty->trigger_error("set_null: missing 'var' parameter");
23 return;
24 }
25
26 $smarty->assign($params['var'], null);
27 }
28
29 ?>

  ViewVC Help
Powered by ViewVC 1.1.2