Zikula_Template_Plugins
[ class tree: Zikula_Template_Plugins ] [ index: Zikula_Template_Plugins ] [ all elements ]

Source for file function.formutil_getvalidationerror.php

Documentation is available at function.formutil_getvalidationerror.php

  1. <?php
  2. /**
  3.  * Zikula Application Framework
  4.  *
  5.  * @copyright (c) 2004, Zikula Development Team
  6.  * @link http://www.zikula.org
  7.  * @version $Id: function.formutil_getvalidationerror.php 24342 2008-06-06 12:03:14Z markwest $
  8.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9.  * @package Zikula_Template_Plugins
  10.  * @subpackage Functions
  11.  */
  12.  
  13. /**
  14.  * Available parameters:
  15.  *   - assign:   If set, the results are assigned to the corresponding variable instead of printed out
  16.  *   - field:    The name of the field for which we wish to get the erorr
  17.  *   - indent:   Wether or not to indent the validation error
  18.  *
  19.  * @author       Robert Gasch
  20.  * @version    $Id: function.formutil_getvalidationerror.php 24342 2008-06-06 12:03:14Z markwest $
  21.  */ 
  22. function smarty_function_formutil_getvalidationerror($params&$smarty)
  23. {
  24.     $error FormUtil::getValidationError ($params['objectType']$params['field']);
  25.  
  26.     if (isset($params['assign'])) {
  27.         $smarty->assign($params['assign']$error);
  28.     else {
  29.         return $error;
  30.     }
  31. }

Documentation generated on Fri, 18 Jul 2008 21:45:19 +0200 by phpDocumentor 1.4.1