mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-01-09 22:17:26 +01:00
Left hints and deprecated functions
This commit is contained in:
parent
e30145d792
commit
8c082bb0a4
@ -7,22 +7,39 @@ use FOS\RestBundle\Controller\FOSRestController;
|
|||||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* @todo Check which of the as deprecated declared functions make sense to remove
|
||||||
|
*
|
||||||
* @author kevinfrantz
|
* @author kevinfrantz
|
||||||
*/
|
*/
|
||||||
abstract class AbstractEntityController extends FOSRestController
|
abstract class AbstractEntityController extends FOSRestController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $entityName;
|
protected $entityName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->setEntityName();
|
$this->setEntityName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*/
|
||||||
abstract protected function setEntityName(): void;
|
abstract protected function setEntityName(): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @param int $id
|
||||||
|
*
|
||||||
|
* @return EntityInterface
|
||||||
|
*/
|
||||||
protected function loadEntityById(int $id): EntityInterface
|
protected function loadEntityById(int $id): EntityInterface
|
||||||
{
|
{
|
||||||
$entity = $this->getDoctrine()
|
$entity = $this->getDoctrine()
|
||||||
@ -35,6 +52,13 @@ abstract class AbstractEntityController extends FOSRestController
|
|||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @param string $slug
|
||||||
|
*
|
||||||
|
* @return EntityInterface
|
||||||
|
*/
|
||||||
protected function loadEntityBySlug(string $slug): EntityInterface
|
protected function loadEntityBySlug(string $slug): EntityInterface
|
||||||
{
|
{
|
||||||
$entity = $this->getDoctrine()
|
$entity = $this->getDoctrine()
|
||||||
@ -47,6 +71,14 @@ abstract class AbstractEntityController extends FOSRestController
|
|||||||
return $entity;
|
return $entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated
|
||||||
|
*
|
||||||
|
* @param string $route
|
||||||
|
* @param int $id
|
||||||
|
*
|
||||||
|
* @return RedirectResponse
|
||||||
|
*/
|
||||||
protected function redirectToRouteById(string $route, int $id): RedirectResponse
|
protected function redirectToRouteById(string $route, int $id): RedirectResponse
|
||||||
{
|
{
|
||||||
return $this->redirectToRoute($route, [
|
return $this->redirectToRoute($route, [
|
||||||
|
Loading…
Reference in New Issue
Block a user