|
|
@@ -80,6 +80,10 @@ class Util {
|
|
|
return $slug;
|
|
|
}
|
|
|
|
|
|
+ public static function slugWithId(string $string, int $id): string {
|
|
|
+ return Util::slug($string) . "-" . $id;
|
|
|
+ }
|
|
|
+
|
|
|
public static function getDisplayFileSize($size) {
|
|
|
if($size < pow(2, 10)) return number_format($size) . " bytes";
|
|
|
if($size < pow(2, 20)) return number_format($size / pow(2, 10), 2) . " KB";
|
|
|
@@ -422,4 +426,4 @@ class Util {
|
|
|
|
|
|
return $string;
|
|
|
}
|
|
|
-}
|
|
|
+}
|