diff --git a/application/src/Controller/AbstractEntityController.php b/application/src/Controller/AbstractEntityController.php index 0804b86..93b6544 100644 --- a/application/src/Controller/AbstractEntityController.php +++ b/application/src/Controller/AbstractEntityController.php @@ -7,22 +7,39 @@ use FOS\RestBundle\Controller\FOSRestController; use Symfony\Component\HttpFoundation\RedirectResponse; /** + * @todo Check which of the as deprecated declared functions make sense to remove + * * @author kevinfrantz */ abstract class AbstractEntityController extends FOSRestController { /** + * @deprecated + * * @var string */ protected $entityName; + /** + * @deprecated + */ public function __construct() { $this->setEntityName(); } + /** + * @deprecated + */ abstract protected function setEntityName(): void; + /** + * @deprecated + * + * @param int $id + * + * @return EntityInterface + */ protected function loadEntityById(int $id): EntityInterface { $entity = $this->getDoctrine() @@ -35,6 +52,13 @@ abstract class AbstractEntityController extends FOSRestController return $entity; } + /** + * @deprecated + * + * @param string $slug + * + * @return EntityInterface + */ protected function loadEntityBySlug(string $slug): EntityInterface { $entity = $this->getDoctrine() @@ -47,6 +71,14 @@ abstract class AbstractEntityController extends FOSRestController return $entity; } + /** + * @deprecated + * + * @param string $route + * @param int $id + * + * @return RedirectResponse + */ protected function redirectToRouteById(string $route, int $id): RedirectResponse { return $this->redirectToRoute($route, [