wngur6076 1 maand geleden
bovenliggende
commit
f716fa9dea
1 gewijzigde bestanden met toevoegingen van 18 en 0 verwijderingen
  1. 18 0
      app/Helpers/DataConverter.php

+ 18 - 0
app/Helpers/DataConverter.php

@@ -189,6 +189,11 @@ class DataConverter
         return self::$codeTitle['ship-type'][$value][$data]['Title'] ?? 'Invalid';
     }
 
+    public static function format_func_body_situation($value, $data)
+    {
+        return self::$codeTitle['body-situation'][$value][$data]['Title'] ?? 'Invalid';
+    }
+
     public static function get_status($value)
     {
         if (isset(self::$codeTitle['status'][$value])) {
@@ -396,4 +401,17 @@ class DataConverter
             self::$codeTitle['condition-type'][$value] = null;
         }
     }
+
+    public static function get_body_situation($value)
+    {
+        if (isset(self::$codeTitle['body-situation'][$value])) {
+            return;
+        }
+
+        try {
+            self::$codeTitle['body-situation'][$value] = collect(Utils::getParamFile("/etc/code-title/body-situation/{$value}"))->keyBy('Code')->toArray();
+        } catch (ParameterException $e) {
+            self::$codeTitle['body-situation'][$value] = null;
+        }
+    }
 }