當前位置: 首頁>>代碼示例>>PHP>>正文


PHP TbHtml::tabs方法代碼示例

本文整理匯總了PHP中TbHtml::tabs方法的典型用法代碼示例。如果您正苦於以下問題:PHP TbHtml::tabs方法的具體用法?PHP TbHtml::tabs怎麽用?PHP TbHtml::tabs使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在TbHtml的用法示例。


在下文中一共展示了TbHtml::tabs方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: testTabs

 public function testTabs()
 {
     $I = $this->codeGuy;
     $html = TbHtml::tabs(array(array('label' => 'Link', 'url' => '#')));
     $nav = $I->createNode($html, 'ul.nav');
     $I->seeNodeCssClass($nav, 'nav-tabs');
 }
開發者ID:AlexanderGrant1,項目名稱:AC41004,代碼行數:7,代碼來源:TbHtmlTest.php

示例2: array

            <a class="brand" href="/"><?php 
echo CHtml::encode(Yii::app()->name);
?>
</a>
            <div class="nav-collapse collapse">

            </div>
        </div>
    </div>
</div>

<div class="container-fluid">
    <div class="row-fluid">
        <div class="span9">
             <?php 
echo TbHtml::tabs(array(array('label' => 'Книги', 'url' => Yii::app()->createUrl('library/library/tabs', array('tab_id' => 'books')), 'active' => isset($_GET['tab_id']) && $_GET['tab_id'] == 'books' ? true : false), array('label' => 'Авторы', 'url' => Yii::app()->createUrl('library/library/tabs', array('tab_id' => 'authors')), 'active' => isset($_GET['tab_id']) && $_GET['tab_id'] == 'authors' ? true : false), array('label' => 'Читатели', 'url' => Yii::app()->createUrl('library/library/tabs', array('tab_id' => 'readers')), 'active' => isset($_GET['tab_id']) && $_GET['tab_id'] == 'readers' ? true : false), array('label' => 'Библиотека', 'url' => Yii::app()->createUrl('library/library/tabs', array('tab_id' => 'library')), 'active' => isset($_GET['tab_id']) && $_GET['tab_id'] == 'library' ? true : false), array('label' => 'Отчеты', 'url' => Yii::app()->createUrl('library/reports', array('tab_id' => 'report')), 'active' => isset($_GET['tab_id']) && $_GET['tab_id'] == 'report' ? true : false), array('label' => 'Поиск', 'url' => Yii::app()->createUrl('library/search', array('tab_id' => 'search')), 'active' => isset($_GET['tab_id']) && $_GET['tab_id'] == 'search' ? true : false)));
?>
            <?php 
echo $content;
?>
        </div>
    </div>

    <hr>

    <footer>
        <p> &copy; 2014 by Agilites. All rights reserved.</p>
    </footer>

</div>
</body>
開發者ID:maxim-bondarenko,項目名稱:library,代碼行數:31,代碼來源:main.php

示例3: array

&lt;?php echo TbHtml::stackedPills(array(
    array('label' => 'Home', 'url' => '#', 'active' => true),
    array('label' => 'Profile', 'url' => '#',),
    array('label' => 'Messages', 'url' => '#',),
)); ?>
</pre>

   <hr class="bs-docs-separator">

   <h2>Dropdowns</h2>

   <h3>Tabs with dropdowns</h3>

   <div class="bs-docs-example">
      <?php 
echo TbHtml::tabs(array(array('label' => 'Home', 'url' => '#', 'active' => true), array('label' => 'Help', 'url' => '#'), array('label' => 'Dropdown', 'items' => $dropdownConfig)));
?>
   </div>

   <pre class="prettyprint linenums">
&lt;?php echo TbHtml::tabs(array(
    array('label' => 'Home', 'url' => '#', 'active' => true),
    array('label' => 'Help', 'url' => '#'),
    array('label' => 'Dropdown', 'items' => array(
        array('label' => 'Action', 'url' => '#'),
        array('label' => 'Another action', 'url' => '#'),
        array('label' => 'Something else here', 'url' => '#'),
        TbHtml::menuDivider(),
        array('label' => 'Separate link', 'url' => '#'),
    )),
)); ?>
開發者ID:crisu83,項目名稱:yiistrap-docs,代碼行數:31,代碼來源:components.php

示例4: tabbable

 /**
  * Generates a tabbable menu.
  * @param array $tabs the tab configurations.
  * @param array $htmlOptions additional HTML attributes.
  * @return string the generated menu.
  */
 public static function tabbable($tabs, $htmlOptions = array())
 {
     $htmlOptions = self::addClassName('tabbable', $htmlOptions);
     $placement = self::popOption('placement', $htmlOptions);
     if (!empty($placement)) {
         $htmlOptions = self::addClassName('tabs-' . $placement, $htmlOptions);
     }
     $menuOptions = self::popOption('menuOptions', $htmlOptions, array());
     $contentOptions = self::popOption('contentOptions', $htmlOptions, array());
     $contentOptions = self::addClassName('tab-content', $contentOptions);
     $menuItems = array();
     foreach ($tabs as $i => &$tabOptions) {
         $icon = self::popOption('icon', $tabOptions);
         $label = self::popOption('label', $tabOptions, '');
         $id = $tabOptions['id'] = self::popOption('id', $tabOptions, 'tab_' . ($i + 1));
         $active = self::getOption('active', $tabOptions, false);
         $disabled = self::popOption('disabled', $tabOptions, false);
         $linkOptions = self::popOption('linkOptions', $tabOptions, array());
         $linkOptions['data-toggle'] = 'tab';
         $itemOptions = self::popOption('itemOptions', $tabOptions, array());
         $items = self::popOption('items', $tabOptions, array());
         $menuItem = array('icon' => $icon, 'label' => $label, 'url' => '#' . $id, 'active' => $active, 'disabled' => $disabled, 'itemOptions' => $itemOptions, 'linkOptions' => $linkOptions, 'items' => $items);
         $menuItems[] = $menuItem;
     }
     ob_start();
     echo TbHtml::openTag('div', $htmlOptions);
     echo TbHtml::tabs($menuItems, $menuOptions);
     echo TbHtml::openTag('div', $contentOptions);
     foreach ($tabs as &$tabOptions) {
         if (self::popOption('active', $tabOptions, false)) {
             $tabOptions = self::addClassName('active', $tabOptions);
         }
         $tabContent = self::popOption('content', $tabOptions, '');
         $tabOptions = self::addClassName('tab-pane', $tabOptions);
         echo TbHtml::tag('div', $tabOptions, $tabContent);
     }
     echo '</div></div>';
     return ob_get_clean();
 }
開發者ID:ZK413,項目名稱:yiimine,代碼行數:45,代碼來源:TbHtml.php

示例5:

<?php

echo TbHtml::tabs(MenuItem::model()->findByPk($id)->getItems());
開發者ID:rizaldi-github,項目名稱:yii-menu-module,代碼行數:3,代碼來源:_TbHtml_tabs.php


注:本文中的TbHtml::tabs方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。