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


PHP DetailView::widget方法代碼示例

本文整理匯總了PHP中DetailView::widget方法的典型用法代碼示例。如果您正苦於以下問題:PHP DetailView::widget方法的具體用法?PHP DetailView::widget怎麽用?PHP DetailView::widget使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DetailView的用法示例。


在下文中一共展示了DetailView::widget方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

<?php

echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'username']]);
?>

<table class="table table-striped">
    <tr>
        <th>Modules</th>
        <th>Controllers</th>
        <th>Actions</th>
        <th>Auth</th>
    </tr>
    <?php 
foreach ($routes as $row) {
    ?>
        <tr >
            <td><?php 
    echo $row['module'];
    ?>
</td >
            <td><?php 
    echo $row['controller'];
    ?>
</td >
            <td><?php 
    echo $row['action'];
    ?>
</td >
            <td><?php 
    echo Html::checkbox('auth[]', $row['auth']);
    ?>
開發者ID:hscstudio,項目名稱:yii2-book-id,代碼行數:31,代碼來源:B.6.4.php

示例2:

<?php

use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model frontend\models\Accesos */
?>
<div class="accesos-col3">


    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'id_persona', 'ing_id_vehiculo', 'ing_fecha', 'ing_hora', 'ing_id_porton', 'ing_id_user', 'egr_id_vehiculo', 'egr_fecha', 'egr_hora', 'egr_id_porton', 'egr_id_user', 'id_concepto', 'motivo', 'cant_acomp', 'created_by', 'created_at', 'updated_by', 'updated_at', 'estado', 'motivo_baja']]);
?>

</div>
開發者ID:ibergonzi,項目名稱:country,代碼行數:14,代碼來源:_col3.php

示例3:

use kartik\grid\GridView;
//use yii\grid\GridView;
use yii\bootstrap\ActiveForm;
use yii\widgets\Pjax;
/* @var $this yii\web\View */
/* @var $searchModel frontend\models\AboutUsSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = 'About Us';
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="about-us-index">

    <h1><?php 
echo Html::encode($this->title);
?>
</h1>
    <?php 
// echo $this->render('_search', ['model' => $searchModel]);
?>
   
   
    <?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['subsection']]);
?>
   
    <?php 
Pjax::end();
?>
</div>

開發者ID:BillsOfHealth,項目名稱:yii2-2015,代碼行數:29,代碼來源:index1.php

示例4:

<?php

/**
 * @author Frank Gehann <fg@randomlol.de>
 * @link https://github.com/Tak0r/TwitterContestScore
 * @license Beerware
 * @package Views
 */
use yii\helpers\Html;
?>

<h3><?php 
echo Html::a(Html::encode($model->name), ['contest/view', 'id' => $model->id]);
?>
</h3>

<?php 
echo DetailView::widget(['model' => $model, 'attributes' => ['trigger', 'year', 'active:boolean', 'last_parse']]);
開發者ID:Tak0r,項目名稱:TwitterContestScore,代碼行數:18,代碼來源:_entry.php


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