本文整理汇总了PHP中frontend\models\SignupForm::getType方法的典型用法代码示例。如果您正苦于以下问题:PHP SignupForm::getType方法的具体用法?PHP SignupForm::getType怎么用?PHP SignupForm::getType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类frontend\models\SignupForm
的用法示例。
在下文中一共展示了SignupForm::getType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: SignupForm
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use frontend\models\SignupForm;
use common\models\User;
$this->title = 'Danh sách người dùng';
$this->params['breadcrumbs'][] = $this->title;
$signupForm = new SignupForm();
$labels = $signupForm->attributeLabels();
?>
<div class="user-index">
<h4><?php
echo Html::encode($this->title);
?>
</h4>
<?php
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'options' => ['width' => '6%']], ['attribute' => 'username', 'label' => $labels['username']], ['attribute' => 'fullname', 'label' => $labels['fullname']], ['attribute' => 'mobile', 'label' => $labels['mobile']], 'email:email', ['attribute' => 'type', 'label' => 'Cấp độ', 'format' => 'text', 'value' => function ($model) {
$signupForm = new SignupForm();
$value = $signupForm->getType($model->type);
return $value;
}], ['attribute' => 'created_by', 'label' => 'Người tạo', 'format' => 'text', 'value' => function ($model) {
$createdBy = User::findOne($model->created_by);
return $createdBy['username'];
}], ['class' => 'yii\\grid\\ActionColumn', 'template' => '{update} {delete}', 'options' => ['width' => '10%']]]]);
?>
</div>