本文整理汇总了PHP中kartik\helpers\Html::endTag方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::endTag方法的具体用法?PHP Html::endTag怎么用?PHP Html::endTag使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类kartik\helpers\Html
的用法示例。
在下文中一共展示了Html::endTag方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: run
function run()
{
parent::run();
$wid = $this->options['id'];
echo Html::activeHiddenInput($this->model, $this->attribute);
echo Html::beginTag('div', ['id' => $wid . '-buttons', 'class' => 'input-group btn-group']);
$items = PublishBehavior::getPublishedOptions();
$colors = PublishBehavior::getPublishedColors();
foreach ($items as $key => $item) {
echo Html::button($item, ['data' => ['value' => $key], 'class' => $key == $this->model->{$this->attribute} ? 'btn btn-' . $colors[$key] . ' active' : 'btn btn-default']);
}
echo Html::endTag('div');
$js_colors = Json::encode($colors);
$js = <<<JS
\$('#{$wid}-buttons').find('button').each(function(){
\$(this).on('click',function(){
\$('#{$wid}-buttons').find('button').each(function(){
\$(this).removeClass('btn-danger btn-warning btn-success btn-info active');
\$(this).addClass('btn-default');
});
var color={$js_colors};
\$(this).removeClass('btn-default');
\$(this).addClass('btn-'+color[\$(this).data('value')]+' active');
\$('#{$wid}').val(\$(this).data('value'))
});
});
JS;
$this->view->registerJs($js);
}
示例2: foreach
$properties = Property::getForGroupId($group->id);
?>
<?php
foreach ($properties as $property) {
?>
<?php
if ($propertyValues = $review->submission->getPropertyValuesByPropertyId($property->id)) {
?>
<?php
echo Html::beginTag('div', ['class' => 'col-md-8']);
?>
<?php
echo $property->handler('form', $review->submission->abstractModel, $propertyValues, 'backend_render_view');
?>
<?php
echo Html::endTag('div');
?>
<?php
}
?>
<?php
}
?>
<?php
}
?>
</div>
</div>
<div class="jarviswidget">
<header></header>
<div class="widget-body">
示例3:
<?php
use kartik\helpers\Html;
use yii\bootstrap\ActiveForm;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
$form = ActiveForm::begin(['id' => 'user-form', 'layout' => 'inline', 'method' => 'POST']);
$ka = $rowNr;
echo Html::beginTag('table');
echo Html::beginTag('tr', ['data-row' => '1']);
echo Html::tag('td', $form->field($auth, '[' . $ka . ']type')->dropDownList($auth->getTypeArr(), ['style' => 'width:120px;', 'prompt' => '--']));
echo Html::tag('td', $form->field($auth, '[' . $ka . ']allowFrom')->textInput(['style' => 'width:120px;']));
echo Html::tag('td', $form->field($auth, '[' . $ka . ']allowTo')->textInput(['style' => 'width:120px;']));
echo Html::endTag('tr');
echo Html::endTag('table');
$form->end();
示例4: Auth
<th style="width:170px;"></th>
</tr>
</thead>
<tbody>
<?php
if ($model->isNewRecord === TRUE) {
$model->auth = [0];
}
// Anzeigen der gespeicherten Logins -------------------
foreach ($model->auth as $i => $authData) {
$auth = new Auth($authData);
echo Html::beginTag('tr');
echo Html::tag('td', $form->field($auth, '[' . $i . ']type')->dropDownList($auth->getTypeArr(), ['style' => 'width:120px;', 'prompt' => '--']));
echo Html::tag('td', $form->field($auth, '[' . $i . ']allowFrom')->textInput(['style' => 'width:120px;']));
echo Html::tag('td', $form->field($auth, '[' . $i . ']allowTo')->textInput(['style' => 'width:120px;']));
echo Html::endTag('tr');
#$ka++;
}
?>
</tbody>
</table>
</div>
</div>
<?php
$js = <<<JS
var ka = "{$ka}";\t
\$(document).on('click','#btn-newauth',function(){
\tka++;\t
\t\$.ajax({
\t\turl:'index.php?r=users/newauthrow&rnr='+ka,
\t\tdataType:'JSON',