Extbase\MVC\Controller
Class Tx_Extbase_MVC_Controller_AbstractController
All Implemented Interfaces:
Direct Known Subclasses:
public class Tx_Extbase_MVC_Controller_AbstractController
implements Tx_Extbase_MVC_Controller_ControllerInterface
An abstract base class for Controllers
Subpackage: MVC\Controller
Version: $ID:$
Field Summary
| protected array | $settings |
| protected | $request |
| protected | $response |
| protected | $argumentsMappingResults |
Method Summary
| boolean | canProcessRequest($request) |
| void | processRequest($request, $response) |
| protected Tx_Extbase_MVC_Controller_ControllerContext | buildControllerContext() |
| void | forward(string $actionName, string $controllerName=NULL, string $extensionName=NULL, array $arguments=NULL) |
| protected void | redirect(string $actionName, string $controllerName=NULL, string $extensionName=NULL, array $arguments=NULL, integer $pageUid=NULL, int $delay=0, int $statusCode=303) |
| protected void | redirectToURI(mixed $uri, int $delay=0, int $statusCode=303) |
| void | throwStatus(integer $statusCode, string $statusMessage=NULL, string $content=NULL) |
Field Detail
$settings
Contains the settings of the current extension
$request
The current request.
$response
The response which will be returned by this action controller
$argumentsMappingResults
The results of the mapping of request arguments to controller arguments
Method Detail
canProcessRequest
Checks if the current request type is supported by the controller.
If your controller only supports certain request types, either replace / modify the supporteRequestTypes property or override this method.
Description Copied From interface:
Specified By
Parameters
processRequest
Processes a general request. The result can be returned by altering the given response.
Description Copied From interface:
Specified By
Parameters
$response - The response, modified by this handler
buildControllerContext
Initialize the controller context
forward
Forwards the request to another controller.
Parameters
$controllerName - Unqualified object name of the controller to forward to. If not specified, the current controller is used.
$extensionName - Name of the extension containing the controller to forward to. If not specified, the current extension is assumed.
$arguments - Arguments to pass to the target action
redirect
Forwards the request to another action and / or controller.
NOTE: This method only supports web requests and will thrown an exception if used with other request types.
Parameters
$controllerName - Unqualified object name of the controller to forward to. If not specified, the current controller is used.
$extensionName - Name of the extension containing the controller to forward to. If not specified, the current extension is assumed.
$arguments - Arguments to pass to the target action
$pageUid - Target page uid. If NULL, the current page uid is used
$delay - (optional) The delay in seconds. Default is no delay.
$statusCode - (optional) The HTTP status code for the redirect. Default is "303 See Other"
redirectToURI
Redirects the web request to another uri.
NOTE: This method only supports web requests and will thrown an exception if used with other request types.
Parameters
$delay - (optional) The delay in seconds. Default is no delay.
$statusCode - (optional) The HTTP status code for the redirect. Default is "303 See Other"
throwStatus
Sends the specified HTTP status immediately.
NOTE: This method only supports web requests and will thrown an exception if used with other request types.
Parameters
$statusMessage - A custom HTTP status message
$content - Body content which further explains the status