WIP: Implementation of stuff goes on
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user