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); } protected function setEntityName(): void { $this->entityName = Node::class; } }