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

Source for file htf_tlb_sample_ibm_tabmenu.phl

Documentation is available at htf_tlb_sample_ibm_tabmenu.phl

  1. <?php
  2. /**
  3.  * htf_tlb_sample_ibm_tabmenuクラス
  4.  *
  5.  * IBMタブメニュー生成クラス(サンプル用)
  6.  *
  7.  * @package HtmlTemplateFramework
  8.  * @subpackage htmltaglib
  9.  * @access  public
  10.  * @author    Yamauchi Shogo <htf@as-prj.com>
  11.  * @version $Id: htf_tlb_sample_ibm_tabmenu.phl ,v 1.0 $
  12.  ***/
  13. require_once("htf_com_initialize.inc");    //共通初期処理
  14. require_once("htf_dat_menu.phl");            //メニュークラス
  15. require_once("htf_tag_element.phl");        //エレメントクラス
  16.  
  17. /**
  18.  * IBMタブメニュー生成クラス(サンプル用)
  19.  * 
  20.  * IBMサンプルのタブメニュータグ生成用のクラス。
  21.  *
  22.  * @access  public
  23.  * @author    Yamauchi Shogo <htf@as-prj.com>
  24.  ***/
  25.     /**
  26.      * 表示するメニューデータ
  27.      * 
  28.      * @access public
  29.      * @var htf_dat_menu 
  30.      ***/
  31.     var $menu;
  32.     /**
  33.      * メニュー間を分割する文字列
  34.      * 
  35.      * @access public
  36.      * @var string 
  37.      ***/
  38.     var $delimstr;        //メニューをスプリットする文字列(テキストメニュー用)
  39.     
  40.         
  41.     /**
  42.      * コンストラクタ
  43.      *
  44.      * 引数の設定値からIBMサンプル用タブメニューを生成します。
  45.      *
  46.      * @param     menu    $menu   タブメニュー用メニューオブジェクト
  47.      * @return    void 
  48.      ***/
  49.     function htf_tlb_sample_ibm_tabmenu($menu=null{
  50.  
  51.         $this->menu = $menu;
  52.         
  53.         if (is_null($this->menu)) {
  54.             $this->menu = new htf_dat_menu();
  55.         }
  56.         return;
  57.     }
  58.     
  59.     /**
  60.      *
  61.      * IBMサンプル用タブメニューHTMLタグを出力します。
  62.      *
  63.      * @access  public
  64.      * @return string 
  65.      ***/
  66.     function get_htmltag({
  67.             
  68.         //子ノードを取得してタグ出力(1階層のみ)
  69.         $strret "";
  70.         for ($i=0;$i count($this->menu->arr_menuitem);$i++{
  71.             if ($i == 0$strret $this->delimstr}
  72.             if (htf_is_existsval($this->menu->arr_menuitem[$i]->label)) {
  73.                 //タグ生成
  74.                 $strret .= '&nbsp;'."\n";
  75.                 $strret .= $this->menu->arr_menuitem[$i]->get_textlinktag();
  76.                 $strret .= '&nbsp;'."\n";
  77.                 $strret .= $this->delimstr;
  78.             }
  79.         }
  80.         return $strret;
  81.     }
  82. }
  83.  
  84. ?>

Documentation generated on Tue, 19 Sep 2006 06:21:35 +0900 by phpDocumentor 1.3.0