Add twig extra bundle to use currency formatter filter. Add custom twig method to display number of active promos. Remove old index.php file.

This commit is contained in:
Krzysztof Płaczek
2024-11-17 12:33:40 +01:00
parent f1c0ec6b3a
commit 48ee68f71a
9 changed files with 264 additions and 60 deletions

View File

@@ -1,5 +1,6 @@
<?php
use Krzysiej\RyobiCrawler\Twig\AppExtension;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\Dotenv\Dotenv;
@@ -17,7 +18,8 @@ class Kernel extends BaseKernel
{
return [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle()
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Twig\Extra\TwigExtraBundle\TwigExtraBundle(),
];
}
@@ -31,6 +33,7 @@ class Kernel extends BaseKernel
->autowire()
->autoconfigure()
;
$container->services()->set(AppExtension::class)->tag('twig.extension');
}
protected function configureRoutes(RoutingConfigurator $routes): void