本文整理汇总了PHP中Prefs::colorizestatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Prefs::colorizestatus方法的具体用法?PHP Prefs::colorizestatus怎么用?PHP Prefs::colorizestatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Prefs
的用法示例。
在下文中一共展示了Prefs::colorizestatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: statusList
public function statusList($data)
{
$slist = array(Prefs::colorizestatus($data['status'], 'delivery'), Prefs::colorizestatus($data['courier_status'], 'courier'), Prefs::colorizestatus($data['pickup_status'], 'pickup'), Prefs::colorizestatus($data['warehouse_status'], 'warehouse'));
return implode('<br />', $slist);
//return '<span class="orange white-text">'.$data['status'].'</span><br /><span class="brown">'.$data['pickup_status'].'</span><br /><span class="green">'.$data['courier_status'].'</span><br /><span class="maroon">'.$data['warehouse_status'].'</span>';
}
示例2: statusList
public function statusList($data)
{
$boxes = Box::where('delivery_id', $data['delivery_id'])->get();
$bcount = 0;
$dcount = 0;
$rcount = 0;
$pcount = 0;
$dclass = '';
$rclass = '';
$pclass = '';
if ($data['status'] == Config::get('jayon.trans_status_mobile_delivered_partial') || $data['status'] == Config::get('jayon.trans_status_mobile_delivered') || $data['status'] == Config::get('jayon.trans_status_mobile_return') || $data['status'] == Config::get('jayon.trans_status_mobile_pending')) {
foreach ($boxes as $box) {
if ($box->deliveryStatus == Config::get('jayon.trans_status_mobile_delivered')) {
$dcount++;
}
if ($box->deliveryStatus == Config::get('jayon.trans_status_mobile_return')) {
$rcount++;
}
if ($box->deliveryStatus == Config::get('jayon.trans_status_mobile_pending')) {
$pcount++;
}
}
$bcount = count($boxes);
$dclass = $dcount == 0 ? 'lightgrey' : '';
$rclass = $rcount == 0 ? 'lightgrey' : '';
$pclass = $pcount == 0 ? 'lightgrey' : '';
/*
if(count($boxes) > ($dcount + $rcount) && $data['logistic_type'] == 'internal'){
$data['status'] = Config::get('jayon.trans_status_mobile_delivered_partial');
}*/
}
$slist = array(Prefs::colorizestatus($data['status'], 'delivery') . '<br /><span class="badge">BX:' . $bcount . '</span> <span class="badge ' . $dclass . ' ">D:' . $dcount . '</span> <span class="badge ' . $rclass . ' ">R:' . $rcount . '</span> <span class="badge ' . $pclass . '">P:' . $pcount . '</span>');
return implode('<br />', $slist);
//return '<span class="orange white-text">'.$data['status'].'</span><br /><span class="brown">'.$data['pickup_status'].'</span><br /><span class="green">'.$data['courier_status'].'</span><br /><span class="maroon">'.$data['warehouse_status'].'</span>';
}