move html from callbacks to twig

This commit is contained in:
envoyr
2022-02-23 16:27:13 +01:00
parent 9177273484
commit 4e4e4eca94
6 changed files with 81 additions and 50 deletions

View File

@@ -18,8 +18,11 @@ namespace Froxlor\UI\Callbacks;
*/
class Text
{
public static function boolean(string $data): string
public static function boolean(string $data): array
{
return $data ? '<i class="fa fa-check-circle"></i>' : '<i class="fa fa-times-circle"></i>';
return [
'type' => 'boolean',
'data' => (bool) $data
];
}
}