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


PHP Breadcrumbs::widget方法代碼示例

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


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

示例1: isset

<?php

echo Breadcrumbs::widget(['links' => isset($view->params['breadcrumbs']) ? $view->params['breadcrumbs'] : []]);
開發者ID:jacmoe,項目名稱:bugitor,代碼行數:3,代碼來源:_breadcrumbs.php

示例2: function

 * Etiam sed turpis ac ipsum condimentum fringilla. Maecenas magna.
 * Proin dapibus sapien vel ante. Aliquam erat volutpat. Pellentesque sagittis ligula eget metus.
 * Vestibulum commodo. Ut rhoncus gravida arcu.
 */
/**
 * @var View $this
 * @var RequestLogSearch $searchModel
 * @var ActiveDataProvider $dataProvider
 */
use yii\helpers\Html;
use kartik\grid\GridView;
use yii\widgets\Pjax;
/** @var IdentityInterface|ActiveRecord $identity */
$identity = Yii::$app->getUser()->identityClass;
$this->title = Module::t('Requests');
echo Breadcrumbs::widget(['links' => [$this->title]]);
?>
<div class="request-log-default-index">
    <h3><?php 
echo Html::encode($this->title);
?>
</h3>

    <?php 
Pjax::begin();
echo GridView::widget(['filterModel' => $searchModel, 'dataProvider' => $dataProvider, 'columns' => [['attribute' => 'id', 'value' => function ($model, $index, $dataColumn) {
    /** @var RequestLog $model */
    return $model->id;
}, 'filter' => false], 'app_id', 'route', 'params', ['attribute' => 'user_id', 'value' => function ($model, $index, $dataColumn) {
    return $model->user ? $model->user->{Module::getInstance()->usernameAttribute} : Module::t('Guest');
}, 'filter' => ArrayHelper::map($identity::find()->all(), 'id', Module::getInstance()->usernameAttribute)], 'ip', ['attribute' => 'datetime', 'value' => function ($model, $index, $dataColumn) {
開發者ID:tqsq2005,項目名稱:Yii2adv,代碼行數:31,代碼來源:index___.php

示例3: array

        echo Html::a(Html::img($assets->baseUrl . '/images/newmail.png', array('title' => $messages . ' ' . Yii::t('BbiiModule.bbii', 'new messages'), 'style' => 'vertical-align:bottom;')), array('message/inbox'), array('class' => 'btn btn-default'));
    } else {
        echo Html::a(Html::img($assets->baseUrl . '/images/mail.png', array('title' => Yii::t('BbiiModule.bbii', 'no new messages'), 'style' => 'vertical-align:bottom;')), array('message/inbox'), array('class' => 'btn btn-default'));
    }
    echo Html::a(Html::img($assets->baseUrl . '/images/settings.png', array('title' => Yii::t('BbiiModule.bbii', 'My settings'), 'style' => 'vertical-align:bottom;')), array('member/view', 'id' => \Yii::$app->user->identity->id), array('class' => 'btn btn-default'));
    echo Html::a(Html::img($assets->baseUrl . '/images/config.png', array('title' => Yii::t('BbiiModule.bbii', 'Forum settings'), 'style' => 'vertical-align:bottom;')), array('setting/index'), array('class' => 'btn btn-default'));
    ?>
        </div>
    <?php 
}
?>
    <h2><?php 
echo $this->context->module->forumTitle;
?>
</h2>
    <br />
    <div id = "nav" class="clearfix">
    <?php 
echo Nav::widget(['items' => $item, 'options' => array('class' => 'nav nav-pills')]);
?>
    </div>
</div>
<?php 
if (isset($this->context->bbii_breadcrumbs)) {
    ?>
    <?php 
    echo Breadcrumbs::widget(array('homeLink' => false, 'links' => $this->context->bbii_breadcrumbs));
    ?>
<!-- breadcrumbs -->
<?php 
}
開發者ID:sourcetoad,項目名稱:bbii2,代碼行數:31,代碼來源:_header.php


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