本文整理匯總了PHP中Box::begin方法的典型用法代碼示例。如果您正苦於以下問題:PHP Box::begin方法的具體用法?PHP Box::begin怎麽用?PHP Box::begin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Box
的用法示例。
在下文中一共展示了Box::begin方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
use themes\admin360\widgets\Panel;
use themes\admin360\widgets\Button;
$this->title = 'اعطای دسترسی به کاربر';
$this->params['breadcrumbs'][] = $this->title;
$accordion = [];
foreach ($modules as $moduleId => $title) {
$accordion[$moduleId]['label'] = $title;
$accordion[$moduleId]['content'] = Html::checkboxList("permisions", $userPermissions, $allPermissions[$moduleId], ['itemOptions' => ['labelOptions' => ['class' => 'checkbox-inline']]]);
$accordion[$moduleId]['contentOptions'] = ['class' => 'in'];
}
?>
<div class="row">
<div class="col-sm-12">
<?php
Box::begin(['title' => 'اعطای دسترسی', 'options' => ['class' => 'box-solid box-primary']]);
?>
<?php
echo Html::beginForm();
?>
<?php
echo Collapse::widget(['items' => $accordion]);
?>
<?php
echo Html::submitButton('<i class="fa fa-save"></i> ذخیره', ['class' => 'btn btn-lg btn-flat margin bg-green']);
?>
<?php
echo Button::widget(['title' => 'انصراف', 'options' => ['class' => 'btn-lg btn-flat margin'], 'color' => 'orange', 'icon' => 'undo', 'url' => array('index')]);
?>
<?php
echo Html::endForm();
示例2:
<?php
Box::begin(['title' => $this->params['subtitle'], 'bodyOptions' => ['class' => 'table-responsive'], 'batchParam' => 'names', 'buttonsTemplate' => $boxButtons, 'grid' => $gridId]);
?>
<?php
echo GridView::widget($gridConfig);
?>
<?php
Box::end();
?>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<?php
Box::begin(['title' => 'Items', 'bodyOptions' => ['class' => 'table-responsive']]);
?>
<div class="panel-group" id="roles" role="tablist" aria-multiselectable="true">
<?php
foreach ($rolesArray as $row) {
?>
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="role-<?php
echo $row['role']->name;
?>
">
<h4 class="panel-title">
<a data-toggle="collapse" data-parent="#roles" href="#role-<?php
echo $row['role']->name;
?>
-collapse" aria-expanded="true" aria-controls="collapseOne">