loadEntityById($id); $view = $this->view($node, 200) ->setTemplate('node/view/standard.html.twig') ->setTemplateVar('node'); return $this->handleView($view); } /** * @Route("/node/{id}/law.{_format}", defaults={"_format"="html"}) */ public function law(int $id): RedirectResponse { $lawId = $this->loadEntityById($id)->getLaw()->getId(); return $this->redirectToRouteById('app_law_show',$lawId); } /** * @Route("/node/{id}/parents.{_format}", defaults={"_format"="html"}) */ public function parents(int $id):Response{ /** * @todo Implement */ } /** * @Route("/node/{id}/childs.{_format}", defaults={"_format"="html"}) */ public function childs(int $id):Response{ /** * @todo Implement */ } protected function setEntityName(): void { $this->entityName = Node::class; } }