Response from a controller
render($view, $parameters, $response = null) |
Render the template and return a Response |
json($data, $status = 200, $headers = array(), $context = array()) |
Encode data and return a Json response |
file($file, $fileName = null, $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT) |
Return a file response |
redirectToRoute($route, $parameters = array(), $status = 302) |
Redirect to route |
redirect($url, $status = 302) |
Redirect to external URL |
forward($controller, $path = array(), $query = array()) |
Forwards the request to another controller |
return $this->render('admin/post/show.html.twig', [
'post' => $post,
'delete_form' => $deleteForm->createView(),
]);
return $this->json($data);
'post' => $post,
'delete_form' => $deleteForm->createView(),
]);
return $this->json($data);
Comments
Related