Extbase\MVC\Controller
Class Tx_Extbase_MVC_Controller_ActionController
- Extbase\MVC\Controller\Tx_Extbase_MVC_Controller_AbstractController
-
Extbase\MVC\Controller\Tx_Extbase_MVC_Controller_ActionController
All Implemented Interfaces:
public class Tx_Extbase_MVC_Controller_ActionController
extends Tx_Extbase_MVC_Controller_AbstractController
A multi action controller. This is by far the most common base class for Controllers.
Subpackage: MVC\Controller
Version: $ID:$
Field Summary
| protected | $view |
| protected string | $viewObjectNamePattern |
| protected string | $defaultViewObjectName |
| protected string | $actionMethodName |
| protected string | $errorMethodName |
Method Summary
| protected void | callActionMethod() |
| protected void | resolveView() |
| protected mixed | resolveViewObjectName() |
| protected void | initializeView($view) |
| protected void | initializeAction() |
| protected string | errorAction() |
Field Detail
$view
By default a Fluid TemplateView is provided, if a template is available, then a view with the same name as the current action will be looked up.
If none is available the $defaultViewObjectName will be used and finally an EmptyView will be created.
$viewObjectNamePattern
Pattern after which the view object name is built if no Fluid template is found.
$defaultViewObjectName
The default view object to use if neither a Fluid template nor an action specific view object could be found.
$actionMethodName
Name of the action method
$errorMethodName
Name of the special error action method which is called in case of errors
Method Detail
callActionMethod
Calls the specified action method and passes the arguments.
If the action returns a string, it is appended to the content in the response object. If the action doesn't return anything and a valid view exists, the view is rendered automatically.
resolveView
Prepares a view for the current action and stores it in $this->view.
By default, this method tries to locate a view with a name matching the current action.
resolveViewObjectName
Determines the fully qualified view object name.
initializeView
Initializes the view before invoking an action method.
Override this method to solve assign variables common for all actions or prepare the view in another way before the action is called.
Parameters
initializeAction
Initializes the controller before invoking an action method.
Override this method to solve tasks which all actions have in common.
errorAction
A special action which is called if the originally intended action could not be called, for example if the arguments were not valid.
The default implementation sets a flash message, request errors and forwards back to the originating action. This is suitable for most actions dealing with form input.