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

Source for file block.pnformtabbedpanel.php

Documentation is available at block.pnformtabbedpanel.php

  1. <?php
  2. /**
  3.  * Tabbed panel element
  4.  *
  5.  * @copyright (c) 2006, Zikula Development Team
  6.  * @link http://www.zikula.org
  7.  * @version $Id: block.pnformtabbedpanel.php 24342 2008-06-06 12:03:14Z markwest $
  8.  * @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
  9.  * @author Jorn Wildt
  10.  * @package Zikula_Template_Plugins
  11.  * @subpackage Blocks
  12.  */
  13.  
  14. /**
  15.  * Tabbel panel element
  16.  *
  17.  * Use this with the {@link pnFormTabbedPanelSet}.
  18.  *
  19.  * @package pnForm
  20.  * @subpackage Plugins
  21. */
  22. {
  23.     /**
  24.      * Panel title
  25.      * @var string 
  26.      */
  27.     var $title;
  28.  
  29.     /**
  30.      * Panel selected status
  31.      * @internal
  32.      * @var bool 
  33.      */
  34.     var $selected;
  35.  
  36.     /**
  37.      * ID of parent panel set (don't touch)
  38.      * @internal
  39.      */
  40.     var $panelSetId;
  41.  
  42.     /**
  43.      * Panel index (don't touch)
  44.      * @internal
  45.      */
  46.     var $index;
  47.  
  48.  
  49.     function getFilename()
  50.     {
  51.         return __FILE__// FIXME: may be found in smarty's data???
  52.     }
  53.  
  54.  
  55.     function create(&$render&$params)
  56.     {
  57.         $this->selected = false;
  58.     }
  59.  
  60.  
  61.     function renderBegin(&$render)
  62.     {
  63.         // Locate parent panelset and register with it
  64.         $panelSet &$this->parentPlugin;
  65.  
  66.         while ($panelSet != null  &&  strcasecmp(get_class($panelSet),'pnformtabbedpanelset'!= 0)
  67.           $panelSet &$panelSet->parentPlugin;
  68.  
  69.         if ($panelSet != null)
  70.           $panelSet->registerTabbedPanel($render$this$this->title);
  71.  
  72.         $style ($this->selected ? '' ' style="display:none"');
  73.         $html "<div id=\"{$this->panelSetId}_{$this->index}\"$style>\n";
  74.         return $html;
  75.     }
  76.  
  77.  
  78.     function renderEnd(&$render)
  79.     {
  80.         $html = "</div>\n";
  81.         return $html;
  82.     }
  83. }
  84.  
  85.  
  86. function smarty_block_pnformtabbedpanel($params, $content, &$render)
  87. {
  88.     return $render->pnFormRegisterBlock('pnFormTabbedPanel'$params$content);

Documentation generated on Fri, 18 Jul 2008 21:43:11 +0200 by phpDocumentor 1.4.1