RepairOrderStatus.php 674 Bytes
<?php

namespace domain\order;

use Yii;
use domain\order\models\RepairOrder as RepairOrderModel;

/**
 * 维修订单状态
 */
class RepairOrderStatus
{
     const WORKING = 1; //维修中
     const FINISH    = 2; // 维修完成

     /**
      * @param $index
      * @return string
      */
     static function getEnLabel($index = '')
     {
          $arr = [
               self::WORKING => "working",
               self::FINISH => "finish",
          ];
          if ('' === $index) {
               return $arr;
          }
          if (isset($arr[$index])) {
               return $arr[$index];
          } else {
               return '';
          }
     }
}