本文整理匯總了PHP中common\models\Order::getStatusList方法的典型用法代碼示例。如果您正苦於以下問題:PHP Order::getStatusList方法的具體用法?PHP Order::getStatusList怎麽用?PHP Order::getStatusList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類common\models\Order
的用法示例。
在下文中一共展示了Order::getStatusList方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: function
break;
case Order::STATUS_CANCELLED:
$class = 'warning';
break;
case Order::STATUS_DELETED:
$class = 'purple';
break;
default:
break;
}
return ['class' => $class];
}, 'columns' => [['class' => 'yii\\grid\\SerialColumn', 'headerOptions' => ['class' => 'col-md-1']], ['attribute' => 'order_sn', 'headerOptions' => ['class' => 'col-md-2'], 'filterInputOptions' => ['class' => 'form-control input-sm']], ['attribute' => 'user_id', 'headerOptions' => ['class' => 'col-md-2'], 'filterInputOptions' => ['class' => 'form-control input-sm'], 'value' => function ($model, $key, $index, $column) {
return $model->user->mobile;
}, 'filter' => Select2::widget(['model' => $searchModel, 'initValueText' => ($user = User::findOne($searchModel->user_id)) ? $user->mobile : '', 'attribute' => 'user_id', 'size' => Select2::SMALL, 'theme' => Select2::THEME_KRAJEE, 'options' => ['placeholder' => '搜索用戶手機...'], 'pluginOptions' => ['allowClear' => true, 'minimumInputLength' => 3, 'ajax' => ['url' => Url::to(['/order/user-mobile-filter']), 'dataType' => 'json', 'data' => new JsExpression('function(params) { return {q:params.term}; }')], 'escapeMarkup' => new JsExpression('function (markup) { return markup; }'), 'templateResult' => new JsExpression('function (user) { return user.text; }'), 'templateSelection' => new JsExpression('function (user) { return user.text; }')]])], ['attribute' => 'payment', 'filter' => Order::getPaymentList(), 'filterInputOptions' => ['class' => 'form-control input-sm'], 'headerOptions' => ['class' => 'col-md-1'], 'value' => function ($model, $key, $index, $column) {
return $model->paymentMsg;
}], ['attribute' => 'real_fee', 'headerOptions' => ['class' => 'col-md-1'], 'filterInputOptions' => ['class' => 'form-control input-sm', 'title' => '支持運算符']], ['attribute' => 'status', 'filter' => Order::getStatusList(), 'filterInputOptions' => ['class' => 'form-control input-sm'], 'headerOptions' => ['class' => 'col-md-2'], 'value' => function ($model, $key, $index, $column) {
return $model->statusMsg;
}], ['attribute' => 'created_at', 'format' => ['date', 'php:Y-m-d H:i'], 'filter' => DatePicker::widget(['model' => $searchModel, 'type' => DatePicker::TYPE_COMPONENT_APPEND, 'attribute' => 'date', 'options' => ['class' => 'input-sm'], 'pluginOptions' => ['autoclose' => true, 'format' => 'yyyy-mm-dd']]), 'headerOptions' => ['class' => 'col-md-2']], ['class' => 'yii\\grid\\ActionColumn', 'header' => '操作', 'headerOptions' => ['class' => 'col-md-1'], 'template' => '{view}']]]);
?>
<?php
Pjax::end();
?>
</div>
</div>
<?php
$script = <<<SCRIPT
\$('.btn-status').click(function() {
\$('[name="OrderSearch[status]"]').val(\$(this).val()).change();
});
setInterval(function () {
\$('.grid-view').yiiGridView('applyFilter');