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


PHP widgets\Breadcrumbs类代码示例

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


在下文中一共展示了Breadcrumbs类的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

//        $menuItems[] = ['label' => 'Зарегистрироваться', 'url' => ['/site/signup']];
//        $menuItems[] = ['label' => 'Войти', 'url' => ['/site/login']];
//    } else {
//        $menuItems[] = [
//            'label' => 'Выйти (' . Yii::$app->user->identity->username . ')',
//            'url' => ['/site/logout'],
//            'linkOptions' => ['data-method' => 'post']
//        ];
//    }
echo Nav::widget(['options' => ['class' => 'navbar-nav navbar-right'], 'items' => $menuItems]);
NavBar::end();
?>

    <div class="container">
        <?php 
echo Breadcrumbs::widget(['homeLink' => ['label' => 'Главная', 'url' => '/'], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
        <?php 
echo Alert::widget();
?>
        <?php 
echo $content;
?>
    </div>
</div>

<footer class="footer">
    <div class="container">
        <p class="pull-left">&copy; Меняла <?php 
echo date('Y');
?>
开发者ID:zinchenkomax,项目名称:moneychanger,代码行数:31,代码来源:main.php

示例8: isset

/* @var $this yii\web\View */
/* @var $searchModel backend\models\UserSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('backend', 'Users');
$this->params['breadcrumbs'][] = $this->title;
?>

<!-- BEGIN PAGE HEADER-->
<h3 class="page-title">
    <?php 
echo Html::encode($this->title);
?>
</h3>
<div class="page-bar">
    <?php 
echo Breadcrumbs::widget(['itemTemplate' => "<li>{link}<i class='fa fa-angle-right'></i></i></li>\n", 'activeItemTemplate' => "<li>{link}</li>\n", 'options' => ['class' => 'page-breadcrumb'], 'homeLink' => ['label' => Yii::t('backend', 'Home'), 'url' => Yii::$app->homeUrl, 'template' => "<li><i class='fa fa-home'></i>{link}<i class='fa fa-angle-right'></i></li>\n"], 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : []]);
?>
</div>
<!-- END PAGE HEADER-->
<!-- BEGIN PAGE CONTENT-->
<div class="row">
    <div class="col-md-12">
        <?php 
echo Alert::widget();
?>
        <!-- Begin: life time stats -->
        <div class="user-index portlet light">
            <div class="portlet-title">
                <div class="caption">
                    <?php 
echo Html::encode($this->title);
开发者ID:hoangl,项目名称:AwsProject,代码行数:31,代码来源:index.php

示例9: isset

    echo $this->blocks['content-header'];
    ?>
                    <?php 
} else {
    ?>
                        <div class="col-sm-<?php 
    echo isset($this->blocks['content-header-actions']) ? 6 : 12;
    ?>
">
                            <h2><?php 
    echo $this->title;
    ?>
</h2>

                            <?php 
    echo Breadcrumbs::widget(['links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 'activeItemTemplate' => "<li class=\"active\"><strong>{link}</strong></li>\n"]);
    ?>
                        </div>
    <?php 
    if (isset($this->blocks['content-header-actions'])) {
        ?>
                            <div class="col-sm-6">
                                <div class="title-action">
        <?php 
        echo $this->blocks['content-header-actions'];
        ?>
                                </div>
                            </div>
                        <?php 
    }
}
开发者ID:jcabanillas,项目名称:yii2-inspinia,代码行数: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: Header

<?php

use yii\helpers\Html;
use yii\widgets\Breadcrumbs;
use yii\widgets\ActiveForm;
use backend\services\LogTypeService;
use yii\helpers\Url;
?>
<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
        <h1>
            自定义日志
        </h1>
        <?php 
echo Breadcrumbs::widget(['tag' => 'ol', 'itemTemplate' => "<li>{link}</li>\n", 'links' => [['label' => '日志列表', 'url' => ['/ajax/customlog/index']]]]);
?>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-header">
                        <h3 class="box-title">增加自定义日志</h3>
                        <div class="box-tools">
                            <ul class="pagination pagination-sm no-margin pull-right">
                                <li><a href="<?php 
echo Url::toRoute('/ajax/customlog/add');
?>
"><i class="fa fa-fw fa-plus"></i></a></li>
                            </ul>
开发者ID:wuxing164,项目名称:tuanlogs,代码行数:31,代码来源:add.php

示例13: 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

示例14:

<?php

use yii\widgets\Breadcrumbs;
$this->title = Yii::t('burivuh', 'History of document: {title}', ['title' => $model->title]);
$breadcrumbs = array_merge($model->getBreadcrumbs(1), ['label' => Yii::t('burivuh', 'History')]);
echo Breadcrumbs::widget(['links' => $breadcrumbs, 'homeLink' => ['label' => Yii::t('burivuh', 'Root'), 'url' => ['/burivuh/category/index']]]);
$callback = \Yii::$app->getModule('burivuh')->usernameCallback;
?>
<h1><?php 
echo $this->title;
?>
</h1>
<table class="table">
    <tr>
        <th><?php 
echo Yii::t('burivuh', 'Date');
?>
</th>
        <th><?php 
echo Yii::t('burivuh', 'Title');
?>
</th>
        <th><?php 
echo Yii::t('burivuh', 'Diff');
?>
</th>
        <th><?php 
echo Yii::t('burivuh', 'User');
?>
</th>
        <th></th>
开发者ID:zabachok,项目名称:yii2-burivuh,代码行数:31,代码来源:history.php

示例15: 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


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