Bootstrap loading of controllers and routes for ticket bundle

This commit is contained in:
Julien Fastré 2024-04-15 15:48:25 +02:00
parent 18e442db29
commit 4d67702a76
Signed by: julienfastre
GPG Key ID: BDE2190974723FCB
5 changed files with 28 additions and 2 deletions

View File

@ -1 +0,0 @@
services:

View File

@ -0,0 +1,15 @@
<?php
namespace Chill\TicketBundle\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class ViewTicketController
{
#[Route('/{_locale}/ticket/ticket/{ticketId}', name: 'chill_ticket_ticket_view')]
public function __invoke(int $ticketId): Response
{
return new Response('ok');
}
}

View File

@ -11,7 +11,7 @@ class ChillTicketExtension extends Extension
{
public function load(array $configs, ContainerBuilder $container)
{
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../../config'));
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../config'));
$loader->load('services.yaml');
}
}

View File

@ -0,0 +1,12 @@
services:
_defaults:
autoconfigure: true
autowire: true
Chill\TicketBundle\Controller\:
resource: '../Controller/'
tags:
- controller.service_arguments