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

Source for file block.box.php

Documentation is available at block.box.php

  1. <?php
  2. /**
  3.  * Smarty plugin
  4.  * @package Smarty
  5.  * @subpackage plugins
  6.  */
  7.  
  8. /**
  9.  * Smarty {box} block plugin
  10.  *
  11.  * Type:    block
  12.  * Name:    box
  13.  * Input:
  14.  *            - title        (optional)    box title
  15.  *            - class        (optional)    overrides the default class 'box'
  16.  *            - biticon values    (optional)    see function.biticon.php for details
  17.  *            - idiv        (optional)    name of class of div that surrounds icon (if not set, no div is created)
  18.  * @uses smarty_function_escape_special_chars()
  19.  * @todo somehow make the variable that is contained within $iselect global --> this will allow importing of outside variables not set in $_REQUEST
  20.  */
  21. function smarty_block_box($params$pContent&$gBitSmarty{
  22.     ifempty$pContent )) {
  23.         return '';
  24.     }
  25.     $atts '';
  26.     foreach$params as $key => $val {
  27.         switch$key {
  28.             case 'title':
  29.                 $gBitSmarty->assign$keytra$val ) );
  30.                 break;
  31.             case 'class':
  32.             case 'iclass':
  33.             case 'ipackage':
  34.             case 'iname':
  35.             case 'iexplain':
  36.             case 'idiv':
  37.                 $gBitSmarty->assign$key,$val );
  38.                 break;
  39.             default:
  40.                 $atts .= $key.'="'.$val.'" ';
  41.                 break;
  42.         }
  43.     }
  44.     $gBitSmarty->assign'content',$pContent );
  45.     $gBitSmarty->assign'atts',$atts );
  46.     return $gBitSmarty->fetch'bitpackage:kernel/box.tpl' );
  47. }
  48. ?>

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