本文整理汇总了PHP中app\models\Person::isClientApproved方法的典型用法代码示例。如果您正苦于以下问题:PHP Person::isClientApproved方法的具体用法?PHP Person::isClientApproved怎么用?PHP Person::isClientApproved使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app\models\Person
的用法示例。
在下文中一共展示了Person::isClientApproved方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: function
<div class="spacer60"></div>
<?php
echo GridView::widget(['dataProvider' => $dataProvider, 'layout' => "{items}\n{pager}", 'columns' => [['class' => 'yii\\grid\\CheckboxColumn', 'headerOptions' => ['width' => '30']], ['headerOptions' => ['width' => '100'], 'header' => $model->generateSegmentFilterDropdown($list_type_id), 'label' => 'Availability', 'format' => 'raw', 'value' => function ($data) use($model) {
return Person::checkAvailability($data->id, $model->id);
}, 'visible' => $list_type_id == 1 ? 1 : 0], ['headerOptions' => ['width' => '100'], 'header' => '<div class="text-center">Client<br />Approved</div>', 'format' => 'raw', 'visible' => $list_type_id == 1 ? 1 : 0, 'value' => function ($data) use($model) {
if (Person::isClientApproved($data->id, $model->id) == 'approved') {
return '<div class="text-center"><div class="btn btn-xs btn-success"><span class="glyphicon glyphicon-ok"></span></div></div>';
}
if (Person::isClientApproved($data->id, $model->id) == 'denied') {
return '<div class="text-center"><div class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-remove"></span></div></div>';
}
return false;
}], ['headerOptions' => ['width' => '130'], 'label' => 'Confirmed', 'format' => 'raw', 'value' => function ($data) use($model) {
return Person::checkConfirmed($data->id, $model->id);
}, 'visible' => $list_type_id == 2 ? 2 : 0], ['headerOptions' => ['width' => '20'], 'format' => 'raw', 'value' => function ($data) {
return $data->generateThumb();
}], ['headerOptions' => ['width' => '140'], 'attribute' => 'fname'], 'lname', ['attribute' => 'Gender', 'format' => 'raw', 'value' => function ($model) {
return ucfirst($model->gender);
}], ['headerOptions' => ['width' => '150'], 'header' => $model->generateRoleFilterDropdown($list_type_id), 'contentOptions' => ['class' => 'text-center'], 'label' => 'Role', 'format' => 'raw', 'value' => function ($data) use($model) {
return $model->generateRoleDropdown($data->id, $model->id);
}], ['class' => 'yii\\grid\\ActionColumn', 'headerOptions' => ['width' => '100'], 'template' => '{view} {delete}', 'buttons' => ['view' => function ($url, $model) {
return '<a class="btn btn-primary btn-xs" href="/person/' . $model->id . '">View User</a>';
}, 'delete' => function ($url, $user_model, $key) use($model, $list_type_id) {
return Html::a('<span class="glyphicon glyphicon-remove"></span>', '/project/listremove/' . $model->id . '/' . $list_type_id . '/' . $user_model->id, []);