本文整理汇总了PHP中TbHtml::breadcrumbs方法的典型用法代码示例。如果您正苦于以下问题:PHP TbHtml::breadcrumbs方法的具体用法?PHP TbHtml::breadcrumbs怎么用?PHP TbHtml::breadcrumbs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TbHtml
的用法示例。
在下文中一共展示了TbHtml::breadcrumbs方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
/**
* Runs the widget.
*/
public function run()
{
// todo: consider adding control property for displaying breadcrumbs even when empty.
if (!empty($this->links)) {
$links = array();
if ($this->homeLabel !== false) {
$label = $this->homeLabel !== null ? $this->homeLabel : TbHtml::icon('home');
$links[$label] = $this->homeUrl !== null ? $this->homeUrl : Yii::app()->homeUrl;
}
foreach ($this->links as $label => $url) {
if (is_string($label) || is_array($url)) {
if ($this->encodeLabel) {
$label = CHtml::encode($label);
}
$links[$label] = $url;
} else {
$links[] = $this->encodeLabel ? CHtml::encode($url) : $url;
}
}
echo TbHtml::breadcrumbs($links, $this->htmlOptions);
}
}
示例2: array
* list of conditions and the following disclaimer in the documentation and/or
* other materials provided with the distribution.
*
* * Neither the name of the organization nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* @var YiiEmbedController $this
* @var string $content
*/
echo '<h1>' . $this->pageTitle . '</h1>';
if ($this->breadcrumbs) {
echo TbHtml::breadcrumbs($this->getPageBreadcrumbs());
}
if ($this->menu) {
$this->widget('bootstrap.widgets.TbNav', array('type' => TbHtml::NAV_TYPE_TABS, 'items' => $this->menu));
}
echo Yii::app()->user->multiFlash();
echo $content;
示例3: array
<div class="span-22">
<div id="content">
<?php
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'Users Management' => array('/user/admin'), 'Manage Profile Field'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n \$('.search-form').toggle();\n return false;\n});\n\$('.search-form form').submit(function(){\n \$.fn.yiiGridView.update('profile-field-grid', {\n data: \$(this).serialize()\n });\n return false;\n});\n");
?>
<h1><?php
echo UserModule::t('Manage Profile Fields');
?>
</h1>
<p><?php
echo UserModule::t("You may optionally enter a comparison operator (<b><</b>, <b><=</b>, <b>></b>, <b>>=</b>, <b><></b> or <b>=</b>) at the beginning of each of your search values to specify how the comparison should be done.");
?>
</p>
<?php
echo CHtml::link(UserModule::t('Advanced Search'), '#', array('class' => 'search-button'));
?>
<div class="search-form" style="display:none">
<?php
$this->renderPartial('_search', array('model' => $model));
?>
</div><!-- search-form -->
<br/>
<br/>
<?php
$this->widget('bootstrap.widgets.TbGridView', array('dataProvider' => $model->search(), 'filter' => $model, 'columns' => array(array('name' => 'varname', 'type' => 'raw', 'value' => 'UHtml::markSearch($data,"varname")'), array('name' => 'title', 'value' => 'UserModule::t($data->title)'), array('name' => 'field_type', 'value' => '$data->field_type', 'filter' => ProfileField::itemAlias("field_type")), 'field_size', array('name' => 'required', 'value' => 'ProfileField::itemAlias("required",$data->required)', 'filter' => ProfileField::itemAlias("required")), 'position', array('name' => 'visible', 'value' => 'ProfileField::itemAlias("visible",$data->visible)', 'filter' => ProfileField::itemAlias("visible")), array('class' => 'bootstrap.widgets.TbButtonColumn'))));
?>
</div>
</div>
示例4: array
<div class="span-22">
<div id="content">
<?php
/* @var $this ListgajiController */
/* @var $model Listgaji */
echo TbHtml::breadcrumbs(array('Home' => '/', 'Error'));
?>
<h2>Error <?php
echo $code;
?>
</h2>
<div class="error">
<?php
echo CHtml::encode($message);
?>
</div>
</div>
</div>
<div class="span-6 last">
<div id="sidebar">
<?php
?>
<div class="well" style="max-width: 340px; padding: 8px 0;">
<?php
echo TbHtml::navList(array(array('label' => 'Home', 'url' => array('/')), array('label' => 'My Profile', 'url' => array('/user/profile/profile')), array('label' => 'Change Password', 'url' => array('/user/profile/changepassword')), TbHtml::menuDivider(), array('label' => 'Another list header'), array('label' => 'About', 'url' => array('/site/page&view=about'))));
?>
</div>
示例5: array
<div class="span-22">
<div id="content">
<?php
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'Manage payroll' => array('/listgaji'), 'View Salary Slip'));
?>
<h2>View Salary Slip User - <?php
echo $model->nip;
?>
</h2>
<hr/>
<?php
$dateObj = DateTime::createFromFormat('!m', $model->month);
$monthName = $dateObj->format('F');
?>
<table class="items table table-condensed table-bordered table-striped table-hover">
<thead>
<tr>
<th colspan=2>Data's Employee</th>
</tr>
</thead>
<tbody>
<tr class="odd">
<td style="width:40%;text-align:right;"><b>Number Salary Slip</b></td>
<td><?php
echo $model->noSlipGaji;
?>
</td>
</tr>
<tr class="even">
示例6: testBreadcrumbs
public function testBreadcrumbs()
{
$I = $this->codeGuy;
$links = array('Home' => '#', 'Library' => '#', 'Data');
$html = TbHtml::breadcrumbs($links, array('class' => 'ul'));
$ul = $I->createNode($html, 'ul.breadcrumb');
$I->seeNodeCssClass($ul, 'ul');
$I->seeNodeNumChildren($ul, 3);
foreach ($ul->children() as $i => $liElement) {
$li = $I->createNode($liElement);
switch ($i) {
case 0:
$a = $li->filter('a');
$I->seeNodeAttribute($a, 'href', '#');
$I->seeNodeText($a, 'Home');
break;
case 1:
$a = $li->filter('a');
$I->seeNodeAttribute($a, 'href', '#');
$I->seeNodeText($a, 'Library');
break;
case 2:
$I->seeNodeText($li, 'Data');
break;
}
}
}
示例7:
<div id="content">
<?php
/* @var $this ListgajiController */
echo TbHtml::breadcrumbs(array('Home' => '/', 'About'));
?>
<h2 style="text-align:center">About</h2>
<hr/>
<p style="text-align:center">This is an online web payroll copyright by PT Prawathiya Karsa Pradiphta. June, 19, 2015.</p>
</div>
示例8:
</section>
<!-- Breadcrumbs
================================================== -->
<section id="breadcrumbs">
<div class="page-header">
<h1>Breadcrumbs</h1>
</div>
<div class="bs-docs-example">
<?php
echo TbHtml::breadcrumbs(array('Home' => '#', 'Library'));
?>
<?php
echo TbHtml::breadcrumbs(array('Home' => '#', 'Library' => '#', 'Data'));
?>
</div>
<pre class="prettyprint linenums">
<?php echo TbHtml::breadcrumbs(array(
'Home' => '#',
'Library' => '#',
'Data',
)); ?></pre>
</section>
<!-- Labels and badges
================================================== -->
<section id="labels-badges">
示例9: array
<div class="span-22">
<div id="content">
<?php
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'Users Management' => array('/user/admin'), 'View User'));
?>
<h2><?php
echo UserModule::t('View User') . ' "' . $model->username . '"';
?>
</h2>
<hr/>
<?php
$attributes = array('id', 'username');
$profileFields = ProfileField::model()->forOwner()->sort()->findAll();
if ($profileFields) {
foreach ($profileFields as $field) {
array_push($attributes, array('label' => UserModule::t($field->title), 'name' => $field->varname, 'type' => 'raw', 'value' => $field->widgetView($model->profile) ? $field->widgetView($model->profile) : ($field->range ? Profile::range($field->range, $model->profile->getAttribute($field->varname)) : $model->profile->getAttribute($field->varname))));
}
}
array_push($attributes, 'password', 'email', 'activkey', 'create_at', 'lastvisit_at', array('name' => 'superuser', 'value' => User::itemAlias("AdminStatus", $model->superuser)), array('name' => 'status', 'value' => User::itemAlias("UserStatus", $model->status)));
$this->widget('zii.widgets.CDetailView', array('data' => $model, 'htmlOptions' => array('class' => 'table table-striped table-condensed table-hover'), 'attributes' => $attributes));
?>
</div>
</div>
<div class="span-6 last">
<div id="sidebar">
<?php
?>
<div class="well" style="max-width: 340px; padding: 8px 0;">
<?php
示例10:
<div id="content">
<?php
/* @var $this ListgajiController */
echo TbHtml::breadcrumbs(array('Home' => '/', 'Contact Us'));
?>
<h2 style="text-align:center">Contact Us</h2>
<hr/>
<p style="text-align:center">If you have questions, please contact Accounting Tax Mr. Faizal or Technical Support Mr. Mukhlis Nursamsyu. Thank you. <br/>June, 19, 2015.</p>
</div>
示例11: array
<div class="span-22">
<div id="content">
<?php
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'My Profile'));
?>
<h1><?php
echo UserModule::t("Change password");
?>
</h1>
<div class="form">
<?php
$form = $this->beginWidget('CActiveForm', array('id' => 'changepassword-form', 'enableAjaxValidation' => true, 'clientOptions' => array('validateOnSubmit' => true)));
?>
<p class="note"><?php
echo UserModule::t('Fields with <span class="required">*</span> are required.');
?>
</p>
<?php
echo $form->errorSummary($model);
?>
<div class="row">
<?php
echo $form->labelEx($model, 'oldPassword');
?>
<?php
echo $form->passwordField($model, 'oldPassword');
?>
示例12:
<?php
/**
* @var $this CController
*/
?>
<div class="main-content">
<?php
if ($this->breadcrumbs) {
?>
<div class="breadcrumbs breadcrumbs-fixed">
<?php
echo TbHtml::breadcrumbs($this->breadcrumbs);
?>
</div>
<?php
}
?>
<div class="page-content">
<div class="page-header">
<h1>
<?php
echo $this->pageTitle;
?>
</h1>
</div>
示例13:
<?php
$this->widget('widgets.default.WMainMenu');
?>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<?php
if ($this->breadcrumbs) {
?>
<div class="row">
<div class="span12" style="margin-top:20px">
<?php
echo TbHtml::breadcrumbs(array_merge(array('首页' => Yii::app()->homeUrl), $this->breadcrumbs));
?>
<!-- breadcrumbs -->
</div>
</div>
<?php
}
echo $content;
?>
</div>
<div class="clear"></div>
<div id="footer">
示例14:
<div class="span-22">
<div id="content">
<?php
/* @var $this ListgajiController */
/* @var $model Listgaji */
echo TbHtml::breadcrumbs(array('Home' => '/', 'Manage Payroll'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n\t\$('.search-form').toggle();\n\treturn false;\n});\n\$('.search-form form').submit(function(){\n\t\$('#listgaji-grid').yiiGridView('update', {\n\t\tdata: \$(this).serialize()\n\t});\n\treturn false;\n});\n\n");
?>
<h2>Manage Payroll</h2>
<hr/>
<?php
//==================== MESSAGE SUCCESS AND FAILED UPLOAD DATA ======================//
if ($sukses > 0) {
Yii::app()->user->setFlash(TbHtml::ALERT_COLOR_SUCCESS, '<strong>Well done!</strong> You successfully insert ' . $sukses . ' data.');
$this->widget('bootstrap.widgets.TbAlert');
?>
<?php
}
?>
<?php
if ($gagal > 0) {
Yii::app()->user->setFlash(TbHtml::ALERT_COLOR_ERROR, '<strong>Oh Snap!</strong> You failed insert ' . $gagal . ' data.');
$this->widget('bootstrap.widgets.TbAlert');
?>
示例15: array
<div class="span-22">
<div id="content">
<?php
echo $updatePass;
echo TbHtml::breadcrumbs(array('Home' => array('/'), 'Users Management'));
Yii::app()->clientScript->registerScript('search', "\n\$('.search-button').click(function(){\n \$('.search-form').toggle();\n return false;\n});\t\n\$('.search-form form').submit(function(){\n \$.fn.yiiGridView.update('user-grid', {\n data: \$(this).serialize()\n });\n return false;\n});\n");
?>
<h2><?php
echo UserModule::t("Manage Users");
?>
</h2>
<hr/>
<?php
//==================== MESSAGE SUCCESS AND FAILED UPLOAD DATA ======================//
if ($sukses > 0) {
Yii::app()->user->setFlash(TbHtml::ALERT_COLOR_SUCCESS, '<strong>Well done!</strong> You successfully insert ' . $sukses . ' data.');
$this->widget('bootstrap.widgets.TbAlert');
?>
<?php
}
?>
<?php
if ($gagal > 0) {
Yii::app()->user->setFlash(TbHtml::ALERT_COLOR_ERROR, '<strong>Oh Snap!</strong> You failed insert ' . $gagal . ' data.');
}
$totalUserExist = '';
if ($alreadyUser > 0) {
foreach ($userExists as $exist) {