feat: several improvements in layout
This commit is contained in:
@@ -14,6 +14,7 @@ class AppExtension extends AbstractExtension
|
||||
new TwigFilter('file_size', [AppRuntime::class, 'formatBytes']),
|
||||
new TwigFilter('file_icon', [AppRuntime::class, 'fileIconFilter'], ['is_safe' => ['html']]),
|
||||
new TwigFilter('format_money', [AppRuntime::class, 'formatMoney']),
|
||||
new TwigFilter('map_status', [AppRuntime::class, 'mapStatus']),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -47,4 +47,15 @@ class AppRuntime implements RuntimeExtensionInterface
|
||||
'class' => $classes,
|
||||
]);
|
||||
}
|
||||
|
||||
public function mapStatus(string $status): string
|
||||
{
|
||||
return match ($status) {
|
||||
'F', 'F/S' => 'Festbuchung',
|
||||
'S' => 'Stornierung',
|
||||
'O' => 'Option',
|
||||
'U' => 'Umbuchung',
|
||||
default => '',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user