当前位置: 首页>>代码示例>>PHP>>正文


PHP Breadcrumbs::widget方法代码示例

本文整理汇总了PHP中yii\widgets\Breadcrumbs::widget方法的典型用法代码示例。如果您正苦于以下问题:PHP Breadcrumbs::widget方法的具体用法?PHP Breadcrumbs::widget怎么用?PHP Breadcrumbs::widget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\widgets\Breadcrumbs的用法示例。


在下文中一共展示了Breadcrumbs::widget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addBreadcrumbs

    public function addBreadcrumbs()
    {
        $view = Yii::$app->getView();
        // No need to add breadcrumbs, if they are completely empty
        if (!isset($view->params['breadcrumbs'])) {
            return null;
        }
        $header = Html::tag('h1', $view->title . ($view->params['subtitle'] ? Html::tag('small', $view->params['subtitle']) : ''));
        $breadcrumbs = Breadcrumbs::widget(['homeLink' => ['label' => '<i class="fa fa-dashboard"></i> ' . Yii::t('hipanel', 'Home'), 'url' => '/'], 'encodeLabels' => false, 'tag' => 'ol', 'links' => isset($view->params['breadcrumbs']) ? $view->params['breadcrumbs'] : []]);
        $content = Json::htmlEncode(Html::tag('section', $header . $breadcrumbs, ['class' => 'content-header']));
        Yii::$app->getView()->registerJs(new JsExpression(<<<JS
            \$('.content-header li a').on('click', function (event) {
                var container = \$('#{$this->id}');
                \$.pjax.click(event, {container: container});
            });
            \$('.content-header').replaceWith({$content});
JS
), \yii\web\View::POS_READY);
    }
开发者ID:hiqdev,项目名称:hipanel-core,代码行数:19,代码来源:Pjax.php

示例2: init

 public function init()
 {
     if ($this->title === null) {
         $this->title = 'Dashboard';
     }
     if ($this->subtitle === null) {
         $this->subtitle = '<small>Version 2.0</small>';
     } elseif ($this->subtitle != '') {
         $this->subtitle = '<small>' . Html::encode($this->subtitle) . '</small>';
     }
     if ($this->breadcrumbs === null) {
         $this->breadcrumbs = '<ol class="breadcrumb">
             <li><a href="#">Home</a></li>
             <li class="active">Dashboard</li>
         </ol>';
     } elseif ($this->breadcrumbs === []) {
         $this->breadcrumbs = '<ol class="breadcrumb">
             <li><pre>SET $this[params]->breadcrumbs</pre></li>
         </ol>';
     } else {
         $this->breadcrumbs = Breadcrumbs::widget(['links' => $this->breadcrumbs]);
     }
 }
开发者ID:cinghie,项目名称:yii2-admin-lte,代码行数:23,代码来源:ContentHeader.php

示例3: init

    /**
     * Initializes the widget.
     * This renders the form open tag.
     */
    public function init()
    {
        $breadcrumbs = \yii\widgets\Breadcrumbs::widget(['homeLink' => ['label' => \Yii::t("yii", "Home"), 'url' => ['admin/index', 'namespace' => 'admin']], 'links' => isset(\Yii::$app->view->params['breadcrumbs']) ? \Yii::$app->view->params['breadcrumbs'] : []]);
        $alert = \skeeks\cms\modules\admin\widgets\Alert::widget();
        $actions = \Yii::$app->view->params['actions'];
        echo <<<HTML
        <div class="main">
            <div class="col-lg-12">
                <div class="panel panel-primary sx-panel sx-panel-content">
                    <div class="panel-heading sx-no-icon">
                        <h2>
                            {$breadcrumbs}
                        </h2>
                        <div class="panel-actions"></div>
                    </div><!-- End .panel-heading -->
                    <div class="panel-body">
                            <div class="panel-content-before">
                                {$actions}
                            </div>
                            <div class="panel-content">
                                    {$alert}

HTML;
    }
开发者ID:Liv1020,项目名称:cms,代码行数:28,代码来源:ContentBlock.php

示例4: foreach

    <section class="content-header">
        <?php 
if (isset($this->params['header'])) {
    ?>
            <h1><?php 
    echo $this->params['header'];
    ?>
</h1>
        <?php 
}
?>
        <?php 
if (isset($this->params['breadcrumbs'])) {
    ?>
        <?php 
    echo Breadcrumbs::widget(['options' => ['class' => 'breadcrumb'], 'encodeLabels' => false, 'homeLink' => ['label' => '<i class="fa fa-dashboard"></i> Главная', 'url' => ['/site/index']], 'links' => $this->params['breadcrumbs']]);
    ?>
        <?php 
}
?>
    </section>

        <?php 
if (isset($this->params['toolbar'])) {
    echo '<div class="content-header">';
    foreach ($this->params['toolbar'] as $button) {
        echo $button . "&nbsp;&nbsp;";
    }
    echo '</div>';
}
?>
开发者ID:ejen,项目名称:yii2-app-advanced,代码行数:31,代码来源:main.php

示例5: isset

<?php

use yii\helpers\Html;
use yii\widgets\Breadcrumbs;
use zabachok\burivuh\assets\BurivuhAsset;
BurivuhAsset::register($this);
$this->registerJs('burivuh.view.init();');
echo Breadcrumbs::widget(['links' => isset($breadcrumbs) ? $breadcrumbs : [], 'homeLink' => false]);
?>

<?php 
echo $this->render('_panel', ['model' => $model]);
?>
<div class="row">
    <div class="col-md-12">
        <h2><?php 
echo Yii::t('burivuh', 'Hot keys');
?>
</h2>
        <span class="label label-default">Ctrl</span> + <span class="label label-default">e</span> - <?php 
echo Yii::t('burivuh', 'edit the document');
?>
<br>
    </div>
</div>
开发者ID:heartshare,项目名称:yii2-burivuh,代码行数:25,代码来源:view.php

示例6:

        $iduser = $an['ID'];
        $nama = $an['NAMA'];
        $email = $an['EMAIL'];
    }
} else {
    $iduser = '';
    $nama = "";
    $email = "";
}
?>
                <!-- Main content -->
                <section class="content">
                	 <div class="col-md-12">
				      <h5>
				        <?php 
echo Breadcrumbs::widget(['itemTemplate' => "<li><b>{link}</b></li>\n", 'links' => [['label' => 'User Management', 'url' => [''], 'template' => "<li><b>{link}</b></li>\n"]]]);
?>
				      </h5>
				    </div>
			<table><div id="form_user">
			<input type="hidden" name="iduser" id="iduser" value="<?php 
echo $iduser;
?>
">
		<tr><td>Nama</td><td><input type="text" class="form-control" id="nama" name="nama" size="50" value=""/></td>
		<td width="50"></td><td>Password</td><td><input type="text" class="form-control" id="pass" name="pass"  value="" size="50"/></td>
		</tr>
		<tr><td>Nik</td><td><input type="text" class="form-control" id="nik" name="nik"  value=""  size="50"/></td>
		<td width="50"></td><td>Access</td>
		<td><input type="checkbox" name="dsb" id="dsb" value="DSB"> Dashboard <input type="checkbox" id="scc" name="scc" value="SCC"> Scalling Campaign 
		<input type="checkbox" name="suc" id="suc" value="SUC"> Sustaining Campaign</td></tr>
开发者ID:agungsuprayitno,项目名称:sme,代码行数:31,代码来源:usermanag.php

示例7: date

?>

<div class="wrap">
    <?php 
NavBar::begin(['options' => ['class' => 'navbar-inverse navbar-top']]);
if (Yii::$app->user->isGuest) {
    echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-top'], 'items' => [['label' => 'Login', 'url' => ['/admin/default/login']]]]);
} else {
    echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-top'], 'items' => [['label' => 'Logout (' . Yii::$app->user->identity->username . ')', 'url' => ['/admin/default/logout'], 'linkOptions' => ['data-method' => 'post']], ['label' => 'Керування користувачами', 'url' => ['/admin/admins/index']], ['label' => 'Керування контентом', 'url' => ['/admin/content/index']], ['label' => 'Керування учасниками та компаніями', 'url' => ['/admin/company/index']], ['label' => 'Керування подіями', 'url' => ['/admin/events/index']], ['label' => 'Керування розсилками', 'url' => ['/admin/mail/index']]]]);
}
NavBar::end();
?>

    <div class="container">
        <?php 
echo Breadcrumbs::widget([]);
?>
        <?php 
echo $content;
?>
    </div>
</div>

<footer class="footer">
    <div class="container">
        <p class="pull-left">&copy; My Company <?php 
echo date('Y');
?>
</p>

        <p class="pull-right"><?php 
开发者ID:unix-admin,项目名称:profitday,代码行数:31,代码来源:main.php

示例8: isset

<body>

<?php 
$this->beginBody();
?>
    <div class="wrap">
        <?php 
//TODO переделать меню под нормальный вид
NavBar::begin(['brandLabel' => 'MYKEYWORDS.RU', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => 'Главная', 'url' => ['/site/index'], 'visible' => Yii::$app->user->isGuest], ['label' => 'О нас', 'url' => ['/site/about'], 'visible' => Yii::$app->user->isGuest], ['label' => 'Контакты', 'url' => ['/site/contact'], 'visible' => Yii::$app->user->isGuest], ['label' => 'Пользователи', 'url' => ['/user/admin/'], 'visible' => Yii::$app->user->identity && Yii::$app->user->identity->isAdmin()], ['label' => 'Профиль', 'url' => ['/user/default/profil/'], 'visible' => !Yii::$app->user->isGuest], ['label' => 'Изменить пароль', 'url' => ['/user/default/change-password/'], 'visible' => !Yii::$app->user->isGuest], ['label' => 'Задания', 'url' => ['/tasks/'], 'visible' => !Yii::$app->user->isGuest], ['label' => 'Тикеты', 'url' => ['/ticket/'], 'visible' => !Yii::$app->user->isGuest], ['label' => 'Финансы', 'url' => ['/financy/'], 'visible' => !Yii::$app->user->isGuest], Yii::$app->user->isGuest ? ['label' => 'Регистрация', 'url' => ['/user/default/signup']] : '', Yii::$app->user->isGuest ? ['label' => 'Авторизация', 'url' => ['/user/default/login']] : ['label' => 'Выход (' . Yii::$app->user->identity->username . ')', 'url' => ['/user/default/logout'], 'linkOptions' => ['data-method' => 'post']]]]);
NavBar::end();
?>

        <div class="container">
            <?php 
echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) && !Yii::$app->user->isGuest ? $this->params['breadcrumbs'] : []]);
?>

            <?php 
Alert::widget();
?>

            <?php 
echo $content;
?>

        </div>
    </div>

    <footer class="footer">
        <div class="container">
开发者ID:goncharovln,项目名称:keywords,代码行数:31,代码来源:main.php

示例9: isset

                <?php 
echo $this->title;
?>
                <?php 
if (isset($this->params['subtitle'])) {
    ?>
                    <small><?php 
    echo $this->params['subtitle'];
    ?>
</small>
                <?php 
}
?>
            </h1>
            <?php 
echo Breadcrumbs::widget(['homeLink' => ['label' => '<i class="fa fa-dashboard"></i> ' . Yii::t('app', 'Home'), 'url' => ['/']], 'encodeLabels' => false, 'tag' => 'ol', 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="box box-primary">
                <div class="box-body">
                    <?php 
echo \common\widgets\Alert::widget();
?>
                    <?php 
echo $content;
?>
                </div>
            </div>
开发者ID:davidfang,项目名称:yii2-adminlte,代码行数:31,代码来源:main.php

示例10:

use backend\models\ErrorLogSearch;
use yii\grid\GridView;
use yii\widgets\Pjax;
use yii\helpers\Html;
use yii\widgets\Breadcrumbs;
use yii\widgets\ActiveForm;
use backend\services\LogTypeService;
?>
<div class="row">
    <div id="breadcrumb" class="col-xs-12">
        <a href="#" class="show-sidebar">
            <i class="fa fa-bars"></i>
        </a>
        <ol class="breadcrumb pull-left">
            <?php 
echo Breadcrumbs::widget(['itemTemplate' => "<li>{link}</li>\n", 'links' => [['label' => '错误信息', 'url' => ['/ajax/error/index'], 'class' => 'ajax-link']]]);
?>
        </ol>
        <div id="social" class="pull-right">
            <?php 
/**
 <a href="#"><i class="fa fa-google-plus"></i></a>
 <a href="#"><i class="fa fa-facebook"></i></a>
 <a href="#"><i class="fa fa-twitter"></i></a>
 <a href="#"><i class="fa fa-linkedin"></i></a>
 <a href="#"><i class="fa fa-youtube"></i></a>
* 
*/
?>
        </div>
    </div>
开发者ID:wuxing164,项目名称:tuanlogs,代码行数:31,代码来源:add.php

示例11: isset

<?php

/*
 * @author Lmy
 * QQ:6232967
 * Create at 2015-12-24 11:09:21
 */
echo \yii\widgets\Breadcrumbs::widget(['homeLink' => ['label' => '首页', 'url' => yii\helpers\Url::to(['site/index']), 'template' => '<div class="weizhi-zt">您现在的位置:{link}'], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'options' => ['class' => 'weizhi'], 'tag' => 'div', 'itemTemplate' => ' &gt; {link}', 'activeItemTemplate' => ' &gt; {link}']) . "</div>";
?>

开发者ID:James88,项目名称:www.yii2.com,代码行数:9,代码来源:_breadcrumbs.php

示例12: isset

            <h1>
                <?php 
    if ($this->title !== null) {
        echo \yii\helpers\Html::encode($this->title);
    } else {
        echo \yii\helpers\Inflector::camel2words(\yii\helpers\Inflector::id2camel($this->context->module->id));
        echo $this->context->module->id !== \Yii::$app->id ? '<small>Module</small>' : '';
    }
    ?>
            </h1>
        <?php 
}
?>

		<?php 
echo Breadcrumbs::widget(['homeLink' => ['label' => '<i class="fa fa-home"></i> 首页', 'encode' => false, 'url' => Yii::$app->homeUrl], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>

    </section>

    <section class="content">
        <?php 
echo Alert::widget();
?>
        <?php 
echo $content;
?>
    </section>
</div>

<footer class="main-footer">
开发者ID:max-wen,项目名称:yii2-app-advanced-autoEnv,代码行数:31,代码来源:content.php

示例13:

$this->beginBody();
?>
        
        <?php 
echo Header::widget();
?>
        
        <section class="page container <?php 
echo $pageSectionClass;
?>
">
            <?php 
if ($breadcrumbs) {
    ?>
                <?php 
    echo Breadcrumbs::widget(['homeLink' => false, 'links' => $breadcrumbs]);
    ?>
            <?php 
}
?>
        
        
            <?php 
echo $content;
?>
 
        </section>
        
        <?php 
$this->endBody();
?>
开发者ID:semnt,项目名称:tp01,代码行数:31,代码来源:admin.php

示例14: date

</head>
<body>

<?php 
$this->beginBody();
?>
    <div class="wrap" style="margin-bottom: 3%">
        <?php 
NavBar::begin(['brandLabel' => 'GdeZaVikend', 'brandUrl' => Yii::$app->homeUrl, 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => [['label' => 'Panel', 'url' => ['/adminpanel']], ['label' => 'Korisnici', 'url' => ['/adminpanel/user']], ['label' => 'Komentari', 'url' => ['/adminpanel/comnt']], ['label' => 'Kategorije', 'url' => ['/adminpanel/catgry']], ['label' => 'Porudzbe', 'url' => ['/adminpanel/order']], ['label' => 'Ponude', 'url' => ['/adminpanel/offer']], Yii::$app->user->isGuest ? ['label' => 'Login', 'url' => ['/site/login']] : ['label' => 'Logout (' . Yii::$app->user->identity->fname . ')', 'url' => ['/site/logout'], 'linkOptions' => ['data-method' => 'post']]]]);
NavBar::end();
?>

        <div class="container" style="padding-top: 5%">
            <?php 
echo Breadcrumbs::widget(['homeLink' => ['label' => 'Panel', 'url' => ['/adminpanel']], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
            <?php 
echo $content;
?>
        </div>
    </div>

    <footer class="footer">
        <div class="container">
            <p class="pull-left">&copy; GdeZaVikend <?php 
echo date('Y');
?>
</p>
        </div>
    </footer>
开发者ID:stefanveljkovicvr,项目名称:vikend,代码行数:31,代码来源:admin.php

示例15: isset

</head>
<body>
<?php 
$this->beginBody();
?>

<div class="wrap module-providers">
    <?php 
NavBar::begin(['brandLabel' => $storeName . ' - ' . (!is_null($provider) ? $provider->name : Yii::t('app', 'Providers Module')), 'brandUrl' => ['/site/index'], 'options' => ['class' => 'navbar-inverse navbar-fixed-top']]);
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menu]);
NavBar::end();
?>

    <div class="container" style="margin-top: 60px;">
        <?php 
echo Breadcrumbs::widget(['homeLink' => ['label' => Yii::t('app', 'Home'), 'url' => ['/provider/default/index']], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
        <?php 
echo $content;
?>
    </div>
</div>

<footer class="footer">
    <div class="container">
        <div class="copyright-ex">&copy; <?php 
echo Yii::t('app', 'Copyright {year} by {company} All rights Reserved', ['year' => date('Y'), 'company' => 'Aggua Inc.']);
?>
</div>

    </div>
开发者ID:rcjusto,项目名称:simplestore,代码行数:31,代码来源:provider.php


注:本文中的yii\widgets\Breadcrumbs::widget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。