WIP: Implementation of stuff goes on

This commit is contained in:
Björn Fromme
2023-10-05 12:53:17 +02:00
parent 96d6170907
commit 1097b84447
23 changed files with 443 additions and 118 deletions
+13
View File
@@ -3,6 +3,7 @@
namespace App\Twig;
use App\BusProNet\DataProvider\CountryDataProvider;
use App\BusProNet\DataProvider\HotelDataProvider;
use App\BusProNet\DataProvider\PickupDataProvider;
use App\BusProNet\Model\Country;
use App\Entity\Teamer;
@@ -19,6 +20,7 @@ class AppRuntime implements RuntimeExtensionInterface
private readonly IntlExtension $intlExtension,
private readonly CountryDataProvider $countries,
private readonly PickupDataProvider $pickups,
private readonly HotelDataProvider $hotels,
private readonly string $environment
) {
}
@@ -59,6 +61,17 @@ class AppRuntime implements RuntimeExtensionInterface
return $pickup->getCity();
}
public function bpnDestinationLabel(int $id): string
{
$hotel = $this->hotels->get($id);
if (null === $hotel) {
return 'unbekannt';
}
return sprintf('%s, %s', $hotel->getName(), $hotel->getCity() ?? '-');
}
public function fileIconFilter(Environment $environment, string $mimeType, ?string $classes = 'w-4 h-4'): string
{
$icon = match ($mimeType) {