testing api-key listing

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-03-03 19:19:18 +01:00
parent 7a26ade8de
commit 56f51703c7
6 changed files with 179 additions and 70 deletions

View File

@@ -47,8 +47,18 @@ class Text
return (int)$attributes['data'] > 0 ? date('d.m.Y H:i', (int)$attributes['data']) : UI::getLng('panel.never');
}
public static function timestampUntil(array $attributes): string
{
return (int)$attributes['data'] > 0 ? date('d.m.Y H:i', (int)$attributes['data']) : UI::getLng('panel.unlimited');
}
public static function crondesc(array $attributes): string
{
return UI::getLng('crondesc.' . $attributes['data']);
}
public static function shorten(array $attributes): string
{
return substr($attributes['data'], 0, 20) . '...';
}
}