2014-09-21 02:07:58 +02:00
|
|
|
title: Controllers
|
|
|
|
summary: Controllers form the backbone of your SilverStripe application. They handle routing URLs to your templates.
|
2014-10-18 00:28:51 +02:00
|
|
|
introduction: In this guide you will learn how to define a Controller class and how they fit into the SilverStripe response and request cycle.
|
|
|
|
|
2016-09-09 08:43:05 +02:00
|
|
|
The [api:Controller] class handles the responsibility of delivering the correct outgoing [api:HTTPResponse] for a
|
|
|
|
given incoming [api:HTTPRequest]. A request is along the lines of a user requesting the homepage and contains
|
2014-10-18 00:28:51 +02:00
|
|
|
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.
|
2014-09-21 02:07:58 +02:00
|
|
|
|
|
|
|
[CHILDREN]
|
|
|
|
|
2014-10-18 00:28:51 +02:00
|
|
|
## Related Documentation
|
|
|
|
|
|
|
|
* [Execution Pipeline](../execution_pipeline)
|
|
|
|
|
|
|
|
## API Documentation
|
2014-09-21 02:07:58 +02:00
|
|
|
|
2014-10-18 00:28:51 +02:00
|
|
|
* [api:Controller]
|
2016-09-09 08:43:05 +02:00
|
|
|
* [api:HTTPRequest]
|
|
|
|
* [api:HTTPResponse]
|