當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Box::begin方法代碼示例

本文整理匯總了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();
開發者ID:ahb360,項目名稱:cms,代碼行數:31,代碼來源:assign.php

示例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">
開發者ID:artkost,項目名稱:yii2-starter-kit,代碼行數:31,代碼來源:index.php


注:本文中的Box::begin方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。