本文整理汇总了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']);
?>
示例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>
示例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>
示例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']]);