mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
FEAUTURE [routing][absence] use routing annotation instead of config file
This commit is contained in:
parent
fb51e44e45
commit
b2924ede70
@ -13,16 +13,22 @@ namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\Form\AbsenceType;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class AbsenceController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @Route(
|
||||
* "/{_locale}/absence",
|
||||
* name="chill_absence_user",
|
||||
* methods={"GET", "POST"}
|
||||
* )
|
||||
*/
|
||||
public function setAbsence(Request $request)
|
||||
{
|
||||
$user = $this->getUser();
|
||||
$form = $this->createForm(AbsenceType::class, $user);
|
||||
$form->add('submit', SubmitType::class, ['label' => 'Create']);
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
||||
|
@ -94,7 +94,3 @@ login_check:
|
||||
|
||||
logout:
|
||||
path: /logout
|
||||
|
||||
chill_absence_user:
|
||||
path: /{_locale}/absence
|
||||
controller: Chill\MainBundle\Controller\AbsenceController::setAbsence
|
||||
|
Loading…
x
Reference in New Issue
Block a user