loadSource($request, $id); $view = $this->view($node, 200) ->setTemplate('node/view/standard.html.twig') ->setTemplateVar('node'); return $this->handleView($view); } private function loadSource(Request $request, int $id): NodeInterface { $node = $this->getDoctrine() ->getRepository(Node::class) ->find($id); if (!$node) { throw $this->createNotFoundException('No node found for id '.$id); } return $node; } }