Merge pull request #3843 from marsvogel/patch-1

DOCS Fix formatting
This commit is contained in:
Will Rossiter 2015-02-03 09:13:01 +13:00
commit 34f0fd4392

View File

@ -67,16 +67,14 @@ It is standard in SilverStripe for your controller actions to be `lowercasewithn
Action methods can return one of four main things:
* an array. In this case the values in the array are available in the templates and the controller completes as
usual by returning a [api:SS_HTTPResponse] with the body set to the current template.
* `HTML`. SilverStripe will wrap the `HTML` into a `SS_HTTPResponse` and set the status code to 200.
* an [api:SS_HTTPResponse] containing a manually defined `status code` and `body`.
* an [api:SS_HTTPResponse_Exception]. A special type of response which indicates a error. By returning the
exception, the execution pipeline can adapt and display any error handlers.
:::php
* an array. In this case the values in the array are available in the templates and the controller completes as usual by returning a [api:SS_HTTPResponse] with the body set to the current template.
* `HTML`. SilverStripe will wrap the `HTML` into a `SS_HTTPResponse` and set the status code to 200.
* an [api:SS_HTTPResponse] containing a manually defined `status code` and `body`.
* an [api:SS_HTTPResponse_Exception]. A special type of response which indicates a error. By returning the exception, the execution pipeline can adapt and display any error handlers.
**mysite/code/controllers/TeamController.php**
:::php
/**
* Return some additional data to the current response that is waiting to go out, this makes $Title set to
* 'MyTeamName' and continues on with generating the response.