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

Source for file function.required.php

Documentation is available at function.required.php

  1. <?php
  2. /**
  3.  * Smarty plugin
  4.  * @package Smarty
  5.  * @subpackage plugins
  6.  */
  7.  
  8. /**
  9.  * smarty_function_required
  10.  */
  11. function smarty_function_required( $pParams, &$gBitSmarty ) {
  12.     $gBitSmarty->loadPlugin( 'smarty_function_biticon' );
  13.     $biticon = array(
  14.         'ipackage' => 'icons',
  15.         'iname'    => 'emblem-important',
  16.         'iexplain' => 'Required',
  17.     );
  18.     $ret = smarty_function_biticon( $biticon, $gBitSmarty );
  19.  
  20.     if( !empty( $pParams['legend'] )) {
  21.         $ret = "<p>$ret ".tra( "Elements marked with this symbol are required." )."</p>";
  22.     }
  23.     return $ret;
  24. }
  25. ?>

Documentation generated on Wed, 29 Jul 2015 13:56:39 +0000 by phpDocumentor 1.5.0-lsces