当前位置: 首页>>代码示例>>PHP>>正文


PHP Prefs::colorizestatus方法代码示例

本文整理汇总了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>';
 }
开发者ID:awidarto,项目名称:bilnatracker,代码行数:6,代码来源:CourierController.php

示例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>';
 }
开发者ID:awidarto,项目名称:bilnatracker,代码行数:35,代码来源:DeliveredController.php


注:本文中的Prefs::colorizestatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。