本文整理匯總了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>';
}