Added AbstractEntityController

This commit is contained in:
Kevin Frantz
2018-10-03 18:55:33 +02:00
parent 94bc8c5da4
commit af860429b9
7 changed files with 77 additions and 35 deletions

View File

@@ -1,17 +1,17 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Request;
use App\Entity\Law;
/**
*
* @author kevinfrantz
*
*/
class LawController extends AbstractController
class LawController extends AbstractEntityController
{
/**
* @Route("/law/{id}.{_format}", defaults={"_format"="html"})
@@ -33,4 +33,10 @@ class LawController extends AbstractController
public function node(int $id):RedirectResponse{
//Implement
}
protected function setEntityName(): void
{
$this->entityName = Law::class;
}
}