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

Source for file block.jstab.php

Documentation is available at block.jstab.php

  1. <?php
  2. /**
  3.  * Smarty plugin
  4.  * @package Smarty
  5.  * @subpackage plugins
  6.  */
  7.  
  8. /**
  9.  * Smarty {jstab} block plugin
  10.   *
  11.  * Type:        block
  12.  * Name:        jstab
  13.  * Input:
  14.  * Abstract:    Used to enclose a set of tabs
  15.  */
  16.  
  17. function smarty_block_jstab$pParams$pContent&$gBitSmarty$pRepeat {
  18.     ifempty$pRepeat ) ){
  19.         global $jsTabLinks;
  20.         
  21.         $tClass = isset$pParams['class'' class="'.$pParams['class'].'"' '';
  22.         $tStyle    = isset$pParams['style'' style="'.$pParams['style'].'"' '';
  23.         $tClick    = isset$pParams['onclick'' onclick="'.$pParams['onclick'].'"' '';
  24.         $tTitle    traisset$pParams['title'$pParams['title''No Title' );
  25.  
  26.         $tabId strtolowerisset$pParams['id'$pParams['id''tab'.preg_replace("/[^A-Za-z0-9]/"''$tTitle) )
  27.  
  28.         $tabString '<li '.$tClick.' '.$tClass.' '.$tStyle.'><a href="#'.$tabId.'" data-toggle="tab">' htmlspecialchars$tTitle '</a></li>';
  29.         ifisset$pParams['position') ) {
  30.             array_splice$jsTabLinks$pParams['position']0$tabString );
  31.         else {
  32.             $jsTabLinks[$tabString;
  33.         }
  34.  
  35.         $ret '<div class="tab-pane" id="'.$tabId.'">'
  36.         $ret .= $pContent;
  37.         $ret .= '</div>';
  38.  
  39.         return $ret;
  40.     }
  41. }
  42. ?>

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