New helper method to return icon type

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2023-03-08 16:34:04 -08:00
parent a6f4e53e2b
commit b3b9efbaff

View file

@ -1147,4 +1147,32 @@ class Helper
return $age; return $age;
} }
public static function iconTypeByItem($item) {
switch ($item) {
case 'asset':
return 'fas fa-barcode';
break;
case 'accessory':
return 'fas fa-keyboard';
break;
case 'component':
return 'fas fa-hdd';
break;
case 'consumable':
return 'fas fa-tint';
break;
case 'license':
return 'far fa-save';
break;
case 'location':
return 'fas fa-map-marker-alt';
break;
case 'user':
return 'fas fa-user';
break;
}
}
} }