Version 6 pre-stable
This version of Silverstripe CMS has not yet been given a stable release. See the release roadmap for more information. Go to documentation for the most recent stable version.

Controllers

The Controller class handles the responsibility of delivering the correct outgoing HTTPResponse for a given incoming HTTPRequest. A request is along the lines of a user requesting the homepage and contains information like the URL, any parameters and where they've come from. The response on the other hand is the actual content of the homepage and the HTTP information we want to give back to the user.

Controllers are the main handlers for functionality like interactive forms, rendering the correct templates and performing and navigating around the permission checks on the users actions.

Introduction to a Controller
A brief look at the definition of a Controller, creating actions and how to respond to requests.
Routing
A more in depth look at how to map requests to particular controllers and actions.
Access Control
Define allowed behavior and add permission based checks to your Controllers.
Redirection
Move users around your site using automatic redirection.
HTTP Middlewares
Create objects for modifying request and response objects across controllers.
Built-in Middleware
Middleware components that come with Silverstripe CMS
CMS JSON APIs
Creating standardised JSON APIs for authenticated users in the CMS.

Related documentation

API documentation