TYPO3 API  SVNRelease
Public Member Functions | Protected Member Functions | Protected Attributes
Tx_Extbase_MVC_Controller_ActionController Class Reference
Inheritance diagram for Tx_Extbase_MVC_Controller_ActionController:
Inheritance graph
[legend]
Collaboration diagram for Tx_Extbase_MVC_Controller_ActionController:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 injectReflectionService (Tx_Extbase_Reflection_Service $reflectionService)
 canProcessRequest (Tx_Extbase_MVC_RequestInterface $request)
 processRequest (Tx_Extbase_MVC_RequestInterface $request, Tx_Extbase_MVC_ResponseInterface $response)

Protected Member Functions

 initializeActionMethodArguments ()
 initializeActionMethodValidators ()
 resolveActionMethodName ()
 callActionMethod ()
 resolveView ()
 setViewConfiguration (Tx_Extbase_MVC_View_ViewInterface $view)
 resolveViewObjectName ()
 initializeView (Tx_Extbase_MVC_View_ViewInterface $view)
 initializeAction ()
 errorAction ()
 getErrorFlashMessage ()
 checkRequestHash ()
 clearCacheOnError ()

Protected Attributes

 $reflectionService
 $view = NULL
 $viewObjectNamePattern = 'Tx_@extension_View_@controller_@action@format'
 $viewFormatToObjectNameMap = array()
 $defaultViewObjectName = 'Tx_Fluid_View_TemplateView'
 $actionMethodName = 'indexAction'
 $errorMethodName = 'errorAction'

Detailed Description

Definition at line 36 of file ActionController.php.


Member Function Documentation

Tx_Extbase_MVC_Controller_ActionController::callActionMethod ( ) [protected]

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.

Parameters:
string$actionMethodNameName of the action method to call
Returns:
void

Definition at line 242 of file ActionController.php.

Referenced by processRequest().

Tx_Extbase_MVC_Controller_ActionController::canProcessRequest ( Tx_Extbase_MVC_RequestInterface request)

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.

Parameters:
Tx_Extbase_MVC_Request$requestThe current request
Returns:
boolean TRUE if this request type is supported, otherwise FALSE

Reimplemented from Tx_Extbase_MVC_Controller_AbstractController.

Definition at line 113 of file ActionController.php.

Referenced by processRequest().

Tx_Extbase_MVC_Controller_ActionController::checkRequestHash ( ) [protected]

Checks the request hash (HMAC), if arguments have been touched by the property mapper.

In case the -Annotation has been set, this suppresses the exception.

Returns:
void
Exceptions:
Tx_Extbase_MVC_Exception_InvalidOrNoRequestHashIn case request hash checking failed
Author:
Sebastian Kurfürst <sebastian@typo3.org>

Definition at line 430 of file ActionController.php.

References Tx_Extbase_MVC_Controller_Argument\ORIGIN_NEWLY_CREATED, and Tx_Extbase_MVC_Controller_Argument\ORIGIN_PERSISTENCE_AND_MODIFIED.

Referenced by processRequest().

Tx_Extbase_MVC_Controller_ActionController::clearCacheOnError ( ) [protected]

Clear cache of current page on error. Needed because we want a re-evaluation of the data. Better would be just do delete the cache for the error action, but that is not possible right now.

Returns:
void

Definition at line 455 of file ActionController.php.

References $GLOBALS, Tx_Extbase_Utility_Cache\clearPageCache(), and Tx_Extbase_Configuration_ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK.

Referenced by errorAction().

Tx_Extbase_MVC_Controller_ActionController::errorAction ( ) [protected]

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.

We clear the page cache by default on an error as well, as we need to make sure the data is re-evaluated when the user changes something.

Returns:
string

Definition at line 385 of file ActionController.php.

References clearCacheOnError(), t3lib_message_AbstractMessage\ERROR, Tx_Extbase_MVC_Controller_AbstractController\forward(), and getErrorFlashMessage().

Tx_Extbase_MVC_Controller_ActionController::getErrorFlashMessage ( ) [protected]

A template method for displaying custom error flash messages, or to display no flash message at all on errors. Override this to customize the flash message in your action controller.

Returns:
string|boolean The flash message or FALSE if no flash message should be set

Definition at line 417 of file ActionController.php.

Referenced by errorAction().

Tx_Extbase_MVC_Controller_ActionController::initializeAction ( ) [protected]

Initializes the controller before invoking an action method.

Override this method to solve tasks which all actions have in common.

Returns:
void

Reimplemented in Tx_Workspaces_Controller_ReviewController, Tx_Workspaces_Controller_AbstractController, Tx_Fluid_ViewHelpers_Widget_Controller_PaginateController, and Tx_Workspaces_Controller_PreviewController.

Definition at line 369 of file ActionController.php.

Referenced by processRequest().

Tx_Extbase_MVC_Controller_ActionController::initializeActionMethodArguments ( ) [protected]

Implementation of the arguments initilization in the action controller: Automatically registers arguments of the current action

Don't override this method - use initializeAction() instead.

Returns:
void
See also:
initializeArguments()

Definition at line 167 of file ActionController.php.

Referenced by processRequest().

Tx_Extbase_MVC_Controller_ActionController::initializeActionMethodValidators ( ) [protected]

Adds the needed valiators to the Arguments:

  • Validators checking the data type from the
    Parameters:
    annotation
  • Custom validators specified with .

In case is NOT set for an argument, the following two validators are also added:

  • Model-based validators ( annotations in the model)
  • Custom model validator classes
Returns:
void

Definition at line 197 of file ActionController.php.

Referenced by processRequest().

Tx_Extbase_MVC_Controller_ActionController::initializeView ( Tx_Extbase_MVC_View_ViewInterface view) [protected]

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:
Tx_Extbase_View_ViewInterface$viewThe view to be initialized
Returns:
void

Definition at line 357 of file ActionController.php.

Referenced by processRequest().

Tx_Extbase_MVC_Controller_ActionController::injectReflectionService ( Tx_Extbase_Reflection_Service reflectionService)

Injects the reflection service

Parameters:
Tx_Extbase_Reflection_Service$reflectionService
Returns:
void

Definition at line 99 of file ActionController.php.

References $reflectionService.

Tx_Extbase_MVC_Controller_ActionController::processRequest ( Tx_Extbase_MVC_RequestInterface request,
Tx_Extbase_MVC_ResponseInterface response 
)
Tx_Extbase_MVC_Controller_ActionController::resolveActionMethodName ( ) [protected]

Resolves and checks the current action method name

Returns:
string Method name of the current action
Exceptions:
Tx_Extbase_MVC_Exception_NoSuchActionif the action specified in the request object does not exist (and if there's no default action either).

Definition at line 225 of file ActionController.php.

References $actionMethodName.

Referenced by processRequest().

Tx_Extbase_MVC_Controller_ActionController::resolveView ( ) [protected]

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.

Returns:
void

Definition at line 269 of file ActionController.php.

References $view, resolveViewObjectName(), and setViewConfiguration().

Referenced by processRequest().

Tx_Extbase_MVC_Controller_ActionController::resolveViewObjectName ( ) [protected]

Determines the fully qualified view object name.

Returns:
mixed The fully qualified view object name or FALSE if no matching view could be found.

Definition at line 329 of file ActionController.php.

References Tx_Extbase_MVC_Controller_AbstractController\$extensionName.

Referenced by resolveView().

Tx_Extbase_MVC_Controller_ActionController::setViewConfiguration ( Tx_Extbase_MVC_View_ViewInterface view) [protected]

Member Data Documentation

Tx_Extbase_MVC_Controller_ActionController::$actionMethodName = 'indexAction' [protected]

Definition at line 84 of file ActionController.php.

Referenced by resolveActionMethodName().

Tx_Extbase_MVC_Controller_ActionController::$defaultViewObjectName = 'Tx_Fluid_View_TemplateView' [protected]

Definition at line 77 of file ActionController.php.

Tx_Extbase_MVC_Controller_ActionController::$errorMethodName = 'errorAction' [protected]

Definition at line 91 of file ActionController.php.

Tx_Extbase_MVC_Controller_ActionController::$reflectionService [protected]

Definition at line 41 of file ActionController.php.

Referenced by injectReflectionService().

Tx_Extbase_MVC_Controller_ActionController::$view = NULL [protected]

Definition at line 49 of file ActionController.php.

Referenced by resolveView().

Tx_Extbase_MVC_Controller_ActionController::$viewFormatToObjectNameMap = array() [protected]

Definition at line 68 of file ActionController.php.

Tx_Extbase_MVC_Controller_ActionController::$viewObjectNamePattern = 'Tx_@extension_View_@controller_@action@format' [protected]

Definition at line 57 of file ActionController.php.


The documentation for this class was generated from the following file: