本文整理汇总了PHP中common\models\User::getSiNo方法的典型用法代码示例。如果您正苦于以下问题:PHP User::getSiNo方法的具体用法?PHP User::getSiNo怎么用?PHP User::getSiNo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common\models\User
的用法示例。
在下文中一共展示了User::getSiNo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
?>
</h3>
<?php
// echo $this->render('_search', ['model' => $searchModel]);
?>
<p>
<?php
//echo Html::a(Yii::t('app', 'Create User'), ['create'], ['class' => 'btn btn-success'])
?>
</p>
<?php
$columns = ['id', 'username', ['attribute' => 'descRolUsuario', 'value' => 'authAssignment.authItem.description'], ['attribute' => 'acceso_externo', 'value' => function ($model) {
return User::getSiNo($model->acceso_externo);
}, 'filter' => User::getSiNo()], ['attribute' => 'email', 'format' => 'email'], ['class' => 'kartik\\grid\\ActionColumn', 'header' => '', 'template' => '{view} {update} {delete} {comentario}', 'buttons' => ['comentario' => function ($url, $model) {
$c = Comentarios::getComentariosByModelId($model->className(), $model->id);
$text = '<span class="glyphicon glyphicon-copyright-mark"';
if (!empty($c)) {
$text .= ' style="color:#FF8000"></span>';
$titl = 'Ingresar nuevo/Ver comentarios';
} else {
$text .= '></span>';
$titl = 'Ingresar nuevo comentario';
}
return Html::a($text, $url, ['title' => $titl, 'onclick' => '$.ajax({
type :"POST",
cache : false,
url : $(this).attr("href"),
success : function(response) {
$("#divcomentarionuevo").html(response);
示例2:
$form = ActiveForm::begin(['options' => ['enctype' => 'multipart/form-data']]);
?>
<div class="form-group">
<?php
$rol = User::getRol($model->id);
echo Html::label('Rol', 'rol', ['class' => 'control-label']);
//Yii::trace(ArrayHelper::map(AuthAssignment::listaRoles(), 'name', 'description'));
echo Html::dropDownList('rol', $rol->name, ArrayHelper::map(AuthAssignment::listaRoles(), 'name', 'description'), ['id' => 'rol', 'class' => 'form-control']);
?>
<?php
echo $form->field($model, 'email')->textInput(['maxlength' => true]);
?>
<?php
echo $form->field($model, 'acceso_externo')->dropDownList(User::getSiNo());
?>
<?php
if ($model->isNewRecord) {
echo $form->field($model, 'foto')->fileInput();
}
if (!$model->isNewRecord) {
echo $form->field($model, 'foto')->hint($model->foto)->fileInput();
}
?>
</div>
<div class="form-group">
<?php