update listing, collections and callbacks

This commit is contained in:
envoyr
2022-02-24 21:39:31 +01:00
parent 703e436b32
commit 5964c3b685
20 changed files with 544 additions and 372 deletions

View File

@@ -18,11 +18,22 @@ namespace Froxlor\UI\Callbacks;
*/
class Text
{
public static function boolean(string $data): array
public static function boolean(?string $data): array
{
return [
'type' => 'boolean',
'data' => (bool) $data
];
}
}
public static function domainWithSan(string $data, array $attributes): array
{
return [
'type' => 'domainWithSan',
'data' => [
'domain' => $data,
'san' => implode(', ', $attributes['san'] ?? []),
]
];
}
}