Symfony\Bundle\FrameworkBundle\Controller\Controller
Controller is a simple implementation of a Controller.
It provides methods to common features needed in controllers.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class Controller
extends ContainerAware
{
- // Inherited members from ContainerAware
- protected ContainerInterface $container;
- // methods
- public string generateUrl()
- public Response forward()
- public RedirectResponse redirect()
- public string renderView()
- public Response render()
- public StreamedResponse stream()
- public NotFoundHttpException createNotFoundException()
- public Form createForm()
- public FormBuilder createFormBuilder()
- public Request getRequest()
- public Registry getDoctrine()
- public mixed getUser()
- public Boolean has()
- public get()
- // Inherited methods from ContainerAware
- public void setContainer()
Hierarchy
Members
protected
Methods
public
- createForm() — Creates and returns a Form instance from the type of the form.
- createFormBuilder() — Creates and returns a form builder instance
- createNotFoundException() — Returns a NotFoundHttpException.
- forward() — Forwards the request to another controller.
- generateUrl() — Generates a URL from the given parameters.
- get() — Gets a service by id.
- getDoctrine() — Shortcut to return the Doctrine Registry service.
- getRequest() — Shortcut to return the request service.
- getUser() — Get a user from the Security Context
- has() — Returns true if the service id is defined.
- redirect() — Returns a RedirectResponse to the given URL.
- render() — Renders a view.
- renderView() — Returns a rendered view.
- stream() — Streams a view.
Inherited from Symfony\Component\DependencyInjection\ContainerAware
public
- setContainer() — Sets the Container associated with this Controller.