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


PHP Person::checkConfirmed方法代碼示例

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


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

示例1: function

            

    
			<?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, []);
}]]], 'tableOptions' => ['class' => 'table table-striped table-condensed valign']]);
?>


            <!-- Send Message Modal -->
開發者ID:jcshep,項目名稱:FrontRunner,代碼行數:28,代碼來源:list.php


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