当前位置: 首页>>代码示例>>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;未经允许,请勿转载。