‪TYPO3CMS  10.4
TYPO3\CMS\Extbase\Mvc\Controller\ActionController Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\Controller\ActionController:
TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface ExtbaseTeam\BlogExample\Controller\BlogController ExtbaseTeam\BlogExample\Controller\ContentController OliverHader\IrreTutorial\Controller\AbstractController TYPO3\CMS\Belog\Controller\BackendLogController TYPO3\CMS\Beuser\Controller\BackendUserController TYPO3\CMS\Beuser\Controller\BackendUserGroupController TYPO3\CMS\Beuser\Controller\PermissionController TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller\Fixture\Controller\ArgumentTestController TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller\Fixture\Controller\TestController TYPO3\CMS\Extbase\Tests\Functional\Validation\Fixture\Controller\TestController TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyController TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyControllerWithValidateAnnotationWithoutParam TYPO3\CMS\Extbase\Tests\Unit\Reflection\Fixture\DummyControllerWithValidateAnnotationWithoutParamTypeHint TYPO3\CMS\Extensionmanager\Controller\AbstractController TYPO3\CMS\Filelist\Controller\FileListController TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController TYPO3\CMS\Form\Controller\AbstractBackendController TYPO3\CMS\Form\Controller\FormFrontendController TYPO3\CMS\FormCachingTests\Controller\FormCachingTestsController TYPO3\CMS\FrontendLogin\Controller\AbstractLoginFormController TYPO3\CMS\IndexedSearch\Controller\AdministrationController TYPO3\CMS\IndexedSearch\Controller\SearchController TYPO3\CMS\Workspaces\Controller\ReviewController TYPO3Fluid\FluidTest\Controller\TemplateController

Public Member Functions

 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
 injectObjectManager (ObjectManagerInterface $objectManager)
 
 injectSignalSlotDispatcher (Dispatcher $signalSlotDispatcher)
 
 injectValidatorResolver (ValidatorResolver $validatorResolver)
 
 injectViewResolver (ViewResolverInterface $viewResolver)
 
 injectReflectionService (ReflectionService $reflectionService)
 
 injectCacheService (CacheService $cacheService)
 
 injectHashService (HashService $hashService)
 
 injectMvcPropertyMappingConfigurationService (MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService)
 
 injectEventDispatcher (EventDispatcherInterface $eventDispatcher)
 
 initializeControllerArgumentsBaseValidators ()
 
 processRequest (RequestInterface $request, ResponseInterface $response)
 
ControllerContext getControllerContext ()
 
 addFlashMessage ($messageBody, $messageTitle='', $severity=AbstractMessage::OK, $storeInSession=true)
 
bool canProcessRequest (RequestInterface $request)
 
 forward ($actionName, $controllerName=null, $extensionName=null, array $arguments=null)
 
 throwStatus ($statusCode, $statusMessage=null, $content=null)
 

Protected Member Functions

 initializeView (ViewInterface $view)
 
 initializeAction ()
 
 initializeActionMethodArguments ()
 
 initializeActionMethodValidators ()
 
 renderAssetsForRequest ($request)
 
string resolveActionMethodName ()
 
 callActionMethod ()
 
 emitBeforeCallActionMethodSignal (array $preparedArguments)
 
ViewInterface resolveView ()
 
 setViewConfiguration (ViewInterface $view)
 
array getViewProperty ($extbaseFrameworkConfiguration, $setting)
 
string errorAction ()
 
 clearCacheOnError ()
 
 addErrorFlashMessage ()
 
string getErrorFlashMessage ()
 
 forwardToReferringRequest ()
 
string getFlattenedValidationErrorMessage ()
 
TYPO3 CMS Extbase Mvc Controller ControllerContext buildControllerContext ()
 
 redirect ($actionName, $controllerName=null, $extensionName=null, array $arguments=null, $pageUid=null, $delay=0, $statusCode=303)
 
 redirectToUri ($uri, $delay=0, $statusCode=303)
 
string addBaseUriIfNecessary ($uri)
 
 mapRequestArgumentsToControllerArguments ()
 

Protected Attributes

TYPO3 CMS Extbase Reflection ReflectionService $reflectionService
 
TYPO3 CMS Extbase Service CacheService $cacheService
 
HashService $hashService
 
ViewInterface $view
 
string $defaultViewObjectName = \TYPO3\CMS\Fluid\View\TemplateView::class
 
string $actionMethodName = 'indexAction'
 
string $errorMethodName = 'errorAction'
 
TYPO3 CMS Extbase Mvc Controller MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService
 
EventDispatcherInterface $eventDispatcher
 
TYPO3 CMS Extbase Mvc Request $request
 
TYPO3 CMS Extbase Mvc Response $response
 
TYPO3 CMS Extbase SignalSlot Dispatcher $signalSlotDispatcher
 
TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
 
TYPO3 CMS Extbase Mvc Web Routing UriBuilder $uriBuilder
 
array $settings
 
TYPO3 CMS Extbase Validation ValidatorResolver $validatorResolver
 
TYPO3 CMS Extbase Mvc Controller Arguments $arguments
 
array $supportedRequestTypes = array( Request::class )
 
TYPO3 CMS Extbase Mvc Controller ControllerContext $controllerContext
 
ConfigurationManagerInterface $configurationManager
 

Private Attributes

ViewResolverInterface $viewResolver
 

Detailed Description

A multi action controller. This is by far the most common base class for Controllers.

Definition at line 54 of file ActionController.php.

Member Function Documentation

◆ addBaseUriIfNecessary()

string TYPO3\CMS\Extbase\Mvc\Controller\ActionController::addBaseUriIfNecessary (   $uri)
protected

Adds the base uri if not already in place.

Parameters
string$uri‪The URI
Returns
‪string

Definition at line 905 of file ActionController.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\redirectToUri().

◆ addErrorFlashMessage()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::addErrorFlashMessage ( )
protected

◆ addFlashMessage()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::addFlashMessage (   $messageBody,
  $messageTitle = '',
  $severity = AbstractMessage::OK,
  $storeInSession = true 
)

Creates a Message object and adds it to the FlashMessageQueue.

Parameters
string$messageBody‪The message
string$messageTitle‪Optional message title
int$severity‪Optional severity, must be one of \TYPO3\CMS\Core\Messaging\FlashMessage constants
bool$storeInSession‪Optional, defines whether the message should be stored in the session (default) or not
Exceptions

Definition at line 747 of file ActionController.php.

Referenced by TYPO3\CMS\Extensionmanager\Controller\ListController\addComposerModeNotification(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addErrorFlashMessage(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\changePasswordAction(), TYPO3\CMS\Form\Controller\FormManagerController\deleteAction(), TYPO3\CMS\Belog\Controller\BackendLogController\deleteMessageAction(), TYPO3\CMS\Extensionmanager\Controller\ListController\distributionsAction(), TYPO3\CMS\Beuser\Controller\PermissionController\editAction(), TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController\extractAction(), TYPO3\CMS\Beuser\Controller\PermissionController\indexAction(), TYPO3\CMS\Filelist\Controller\FileListController\indexAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\initiatePasswordResetAction(), TYPO3\CMS\Extensionmanager\Controller\DownloadController\installDistributionAction(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\recoveryAction(), TYPO3\CMS\Extensionmanager\Controller\ActionController\removeExtensionAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\terminateBackendUserSessionAction(), TYPO3\CMS\Extensionmanager\Controller\ActionController\toggleExtensionInstallationStateAction(), and TYPO3\CMS\Extensionmanager\Controller\DownloadController\updateExtensionAction().

◆ buildControllerContext()

TYPO3 CMS Extbase Mvc Controller ControllerContext TYPO3\CMS\Extbase\Mvc\Controller\ActionController::buildControllerContext ( )
protected

◆ callActionMethod()

TYPO3\CMS\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.

Definition at line 467 of file ActionController.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\processRequest().

◆ canProcessRequest()

bool TYPO3\CMS\Extbase\Mvc\Controller\ActionController::canProcessRequest ( 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 supportedRequestTypes property or override this method.

Parameters
\TYPO3\CMS\Extbase\Mvc\RequestInterface$request‪The current request
Returns
‪bool TRUE if this request type is supported, otherwise FALSE

Implements TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface.

Definition at line 773 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$request.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\processRequest().

◆ clearCacheOnError()

TYPO3\CMS\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.

Definition at line 642 of file ActionController.php.

References $GLOBALS, and TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\errorAction().

◆ emitBeforeCallActionMethodSignal()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::emitBeforeCallActionMethodSignal ( array  $preparedArguments)
protected

Emits a signal before the current action is called

Parameters
array$preparedArguments

Definition at line 496 of file ActionController.php.

◆ errorAction()

string TYPO3\CMS\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 629 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addErrorFlashMessage(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\clearCacheOnError(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\forwardToReferringRequest(), and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\getFlattenedValidationErrorMessage().

◆ forward()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::forward (   $actionName,
  $controllerName = null,
  $extensionName = null,
array  $arguments = null 
)

Forwards the request to another action and / or controller.

Request is directly transferred to the other action / controller without the need for a new request.

Parameters
string$actionName‪Name of the action to forward to
string | null$controllerName‪Unqualified object name of the controller to forward to. If not specified, the current controller is used.
string | null$extensionName‪Name of the extension containing the controller to forward to. If not specified, the current extension is assumed.
array | null$argumentsArguments to pass to the target action
Exceptions
StopActionException
See also
redirect()

Definition at line 815 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$arguments.

Referenced by TYPO3\CMS\Beuser\Controller\BackendUserController\addToCompareListAction(), TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller\Fixture\Controller\ArgumentTestController\forwardAction(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\forwardToReferringRequest(), TYPO3\CMS\FrontendLogin\Controller\LoginController\handleLoginForwards(), OliverHader\IrreTutorial\Controller\QueueController\indexAction(), TYPO3\CMS\Filelist\Controller\FileListController\indexAction(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\initializeChangePasswordAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\initiatePasswordResetAction(), TYPO3\CMS\Extensionmanager\Controller\DownloadController\installDistributionAction(), TYPO3\CMS\Extensionmanager\Controller\ActionController\installExtensionWithoutSystemDependencyCheckAction(), TYPO3\CMS\Extensionmanager\Controller\DownloadController\installExtensionWithoutSystemDependencyCheckAction(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\notifyPasswordChange(), TYPO3\CMS\FrontendLogin\Controller\LoginController\overviewAction(), TYPO3\CMS\Form\Controller\FormFrontendController\performAction(), OliverHader\IrreTutorial\Controller\AbstractController\process(), OliverHader\IrreTutorial\Controller\QueueController\processAction(), TYPO3\CMS\Filelist\Controller\FileListController\searchAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\terminateBackendUserSessionAction(), ExtbaseTeam\BlogExample\Controller\BlogController\testForwardAction(), and TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\validateIfHashHasExpired().

◆ forwardToReferringRequest()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::forwardToReferringRequest ( )
protected

If information on the request before the current request was sent, this method forwards back to the originating request. This effectively ends processing of the current request, so do not call this method before you have finished the necessary business logic!

Exceptions
StopActionException

Definition at line 684 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$arguments, TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$request, TYPO3\CMS\Extbase\Mvc\Controller\ActionController\forward(), and TYPO3\CMS\Extbase\Mvc\Request\setOriginalRequest().

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\errorAction().

◆ getControllerContext()

ControllerContext TYPO3\CMS\Extbase\Mvc\Controller\ActionController::getControllerContext ( )

◆ getErrorFlashMessage()

string TYPO3\CMS\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 The flash message or FALSE if no flash message should be set

Reimplemented in ExtbaseTeam\BlogExample\Controller\BlogController.

Definition at line 672 of file ActionController.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addErrorFlashMessage().

◆ getFlattenedValidationErrorMessage()

string TYPO3\CMS\Extbase\Mvc\Controller\ActionController::getFlattenedValidationErrorMessage ( )
protected

Returns a string with a basic error message about validation failure. We may add all validation error messages to a log file in the future, but for security reasons (

See also
‪#54074) we do not return these here.
Returns
‪string

Definition at line 723 of file ActionController.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\errorAction().

◆ getViewProperty()

array TYPO3\CMS\Extbase\Mvc\Controller\ActionController::getViewProperty (   $extbaseFrameworkConfiguration,
  $setting 
)
protected

Handles the path resolving for *rootPath(s)

numerical arrays get ordered by key ascending

Parameters
array$extbaseFrameworkConfiguration
string$setting‪parameter name from TypoScript
Returns
‪array

Definition at line 604 of file ActionController.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\setViewConfiguration().

◆ initializeAction()

◆ initializeActionMethodArguments()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::initializeActionMethodArguments ( )
protected

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

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

Exceptions

Definition at line 272 of file ActionController.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\processRequest().

◆ initializeActionMethodValidators()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::initializeActionMethodValidators ( )
protected

Adds the needed validators to the Arguments:

  • ‪Validators checking the data type from the
    Parameters
    annotation
  • ‪Custom validators specified with validate annotations.
  • ‪Model-based validators (validate annotations in the model)
  • ‪Custom model validator classes

Definition at line 301 of file ActionController.php.

References $validator.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\processRequest().

◆ initializeControllerArgumentsBaseValidators()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::initializeControllerArgumentsBaseValidators ( )

Collects the base validators which were defined for the data type of each controller argument and adds them to the argument's validator chain.

Definition at line 352 of file ActionController.php.

References $validator.

◆ initializeView()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::initializeView ( ViewInterface  $view)
protected

◆ injectCacheService()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectCacheService ( CacheService  $cacheService)
Parameters
\TYPO3\CMS\Extbase\Service\CacheService$cacheService

Definition at line 215 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$cacheService.

◆ injectConfigurationManager()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectConfigurationManager ( ConfigurationManagerInterface  $configurationManager)

◆ injectEventDispatcher()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectEventDispatcher ( EventDispatcherInterface  $eventDispatcher)

◆ injectHashService()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectHashService ( HashService  $hashService)
Parameters
HashService$hashService

Definition at line 223 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$hashService.

◆ injectMvcPropertyMappingConfigurationService()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectMvcPropertyMappingConfigurationService ( MvcPropertyMappingConfigurationService  $mvcPropertyMappingConfigurationService)
Parameters
\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService$mvcPropertyMappingConfigurationService

Definition at line 231 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$mvcPropertyMappingConfigurationService.

◆ injectObjectManager()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectObjectManager ( ObjectManagerInterface  $objectManager)

Injects the object manager

Parameters
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface$objectManager

Definition at line 173 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$objectManager, and TYPO3\CMS\Extbase\Object\ObjectManagerInterface\get().

◆ injectReflectionService()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectReflectionService ( ReflectionService  $reflectionService)
Parameters
\TYPO3\CMS\Extbase\Reflection\ReflectionService$reflectionService

Definition at line 207 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$reflectionService.

◆ injectSignalSlotDispatcher()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectSignalSlotDispatcher ( Dispatcher  $signalSlotDispatcher)
Parameters
\TYPO3\CMS\Extbase\SignalSlot\Dispatcher$signalSlotDispatcher

Definition at line 182 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$signalSlotDispatcher.

◆ injectValidatorResolver()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectValidatorResolver ( ValidatorResolver  $validatorResolver)
Parameters
\TYPO3\CMS\Extbase\Validation\ValidatorResolver$validatorResolver

Definition at line 190 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$validatorResolver.

◆ injectViewResolver()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectViewResolver ( ViewResolverInterface  $viewResolver)
Parameters
ViewResolverInterface$viewResolver

Definition at line 199 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$viewResolver.

◆ mapRequestArgumentsToControllerArguments()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::mapRequestArgumentsToControllerArguments ( )
protected

Maps arguments delivered by the request object to the local controller arguments.

Exceptions
Exception

Definition at line 935 of file ActionController.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\processRequest().

◆ processRequest()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::processRequest ( RequestInterface  $request,
ResponseInterface  $response 
)

Handles a request. The result output is returned by altering the given response.

Parameters
\TYPO3\CMS\Extbase\Mvc\RequestInterface$request‪The request object
\TYPO3\CMS\Extbase\Mvc\ResponseInterface$response‪The response, modified by this handler
Exceptions

Implements TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface.

Reimplemented in TYPO3\CMS\IndexedSearch\Controller\AdministrationController, ExtbaseTeam\BlogExample\Controller\BlogController, TYPO3\CMS\Beuser\Controller\BackendUserController, ExtbaseTeam\BlogExample\Controller\ContentController, TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetController, and OliverHader\IrreTutorial\Controller\AbstractController.

Definition at line 371 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$request, TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$response, TYPO3\CMS\Extbase\Mvc\Controller\ActionController\buildControllerContext(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\callActionMethod(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\canProcessRequest(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\initializeAction(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\initializeActionMethodArguments(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\initializeActionMethodValidators(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\initializeView(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\mapRequestArgumentsToControllerArguments(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\renderAssetsForRequest(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\resolveActionMethodName(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\resolveView(), TYPO3\CMS\Extbase\Mvc\Request\setDispatched(), and TYPO3\CMS\Extbase\Mvc\Response\setRequest().

Referenced by TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller\ActionControllerArgumentTest\dispatch().

◆ redirect()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::redirect (   $actionName,
  $controllerName = null,
  $extensionName = null,
array  $arguments = null,
  $pageUid = null,
  $delay = 0,
  $statusCode = 303 
)
protected

Redirects the request to another action and / or controller.

Redirect will be sent to the client which then performs another request to the new URI.

NOTE: This method only supports web requests and will thrown an exception if used with other request types.

Parameters
string$actionName‪Name of the action to forward to
string | null$controllerName‪Unqualified object name of the controller to forward to. If not specified, the current controller is used.
string | null$extensionName‪Name of the extension containing the controller to forward to. If not specified, the current extension is assumed.
array | null$argumentsArguments to pass to the target action
int | null$pageUid‪Target page uid. If NULL, the current page uid is used
int$delay‪(optional) The delay in seconds. Default is no delay.
int$statusCode‪(optional) The HTTP status code for the redirect. Default is "303 See Other
Exceptions
StopActionException
See also
forward()

Definition at line 852 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$arguments, TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger(), and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\redirectToUri().

Referenced by TYPO3\CMS\Beuser\Controller\BackendUserGroupController\addToCompareListAction(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\changePasswordAction(), TYPO3\CMS\Beuser\Controller\BackendUserGroupController\compareAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\compareAction(), OliverHader\IrreTutorial\Controller\ContentController\createAction(), OliverHader\IrreTutorial\Controller\ContentController\deleteAction(), TYPO3\CMS\Form\Controller\FormManagerController\deleteAction(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\deleteIndexedItemAction(), TYPO3\CMS\Belog\Controller\BackendLogController\deleteMessageAction(), TYPO3\CMS\Extensionmanager\Controller\ExtensionComposerStatusController\detailAction(), TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController\extractAction(), TYPO3\CMS\IndexedSearch\Controller\SearchController\initialize(), TYPO3\CMS\Extensionmanager\Controller\DownloadController\installDistributionAction(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\recoveryAction(), TYPO3\CMS\Extensionmanager\Controller\ActionController\reloadExtensionDataAction(), TYPO3\CMS\Beuser\Controller\BackendUserGroupController\removeAllFromCompareListAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\removeAllFromCompareListAction(), TYPO3\CMS\Beuser\Controller\BackendUserGroupController\removeFromCompareListAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\removeFromCompareListAction(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\saveStopwordsKeywordsAction(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\statisticDetailsAction(), TYPO3\CMS\Extensionmanager\Controller\ActionController\toggleExtensionInstallationStateAction(), OliverHader\IrreTutorial\Controller\ContentController\updateAction(), and TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\validateIfHashHasExpired().

◆ redirectToUri()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::redirectToUri (   $uri,
  $delay = 0,
  $statusCode = 303 
)
protected

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
mixed$uri‪A string representation of a URI
int$delay‪(optional) The delay in seconds. Default is no delay.
int$statusCode‪(optional) The HTTP status code for the redirect. Default is "303 See Other
Exceptions
StopActionException

Definition at line 878 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addBaseUriIfNecessary(), and TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer\OBJECTTYPE_USER.

Referenced by TYPO3\CMS\FrontendLogin\Controller\LoginController\handleRedirect(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\redirect(), and TYPO3\CMS\Beuser\Controller\PermissionController\updateAction().

◆ renderAssetsForRequest()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::renderAssetsForRequest (   $request)
protected

Method which initializes assets that should be attached to the response for the given $request, which contains parameters that an override can use to determine which assets to add via PageRenderer.

This default implementation will attempt to render the sections "HeaderAssets" and "FooterAssets" from the template that is being rendered, inserting the rendered content into either page header or footer, as appropriate. Both sections are optional and can be used one or both in combination.

You can add assets with this method without worrying about duplicates, if for example you do this in a plugin that gets used multiple time on a page.

Parameters
\TYPO3\CMS\Extbase\Mvc\RequestInterface$request

Definition at line 424 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$arguments, and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$request.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\processRequest().

◆ resolveActionMethodName()

string TYPO3\CMS\Extbase\Mvc\Controller\ActionController::resolveActionMethodName ( )
protected

Resolves and checks the current action method name

Returns
‪string Method name of the current action
Exceptions

Definition at line 451 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$actionMethodName.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\processRequest().

◆ resolveView()

◆ setViewConfiguration()

◆ throwStatus()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::throwStatus (   $statusCode,
  $statusMessage = null,
  $content = null 
)

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
int$statusCode‪The HTTP status code
string$statusMessage‪A custom HTTP status message
string$content‪Body content which further explains the status
Exceptions
StopActionException

Definition at line 920 of file ActionController.php.

Member Data Documentation

◆ $actionMethodName

string TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$actionMethodName = 'indexAction'
protected

Name of the action method

Definition at line 89 of file ActionController.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\resolveActionMethodName().

◆ $arguments

◆ $cacheService

TYPO3 CMS Extbase Service CacheService TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$cacheService
protected

◆ $configurationManager

ConfigurationManagerInterface TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$configurationManager
protected

◆ $controllerContext

TYPO3 CMS Extbase Mvc Controller ControllerContext TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$controllerContext
protected

◆ $defaultViewObjectName

string TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$defaultViewObjectName = \TYPO3\CMS\Fluid\View\TemplateView::class
protected

The default view object to use if none of the resolved views can render a response for the current request.

Definition at line 83 of file ActionController.php.

◆ $errorMethodName

string TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$errorMethodName = 'errorAction'
protected

Name of the special error action method which is called in case of errors

Definition at line 95 of file ActionController.php.

◆ $eventDispatcher

EventDispatcherInterface TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$eventDispatcher
protected

◆ $hashService

HashService TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$hashService
protected

◆ $mvcPropertyMappingConfigurationService

TYPO3 CMS Extbase Mvc Controller MvcPropertyMappingConfigurationService TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$mvcPropertyMappingConfigurationService
protected

◆ $objectManager

TYPO3 CMS Extbase Object ObjectManagerInterface TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$objectManager
protected

◆ $reflectionService

TYPO3 CMS Extbase Reflection ReflectionService TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$reflectionService
protected

◆ $request

◆ $response

◆ $settings

array TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$settings
protected

Contains the settings of the current extension

Definition at line 133 of file ActionController.php.

◆ $signalSlotDispatcher

TYPO3 CMS Extbase SignalSlot Dispatcher TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$signalSlotDispatcher
protected

◆ $supportedRequestTypes

array TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$supportedRequestTypes = array( Request::class )
protected

An array of supported request types. By default only web requests are supported. Modify or replace this array if your specific controller supports certain (additional) request types.

Definition at line 149 of file ActionController.php.

◆ $uriBuilder

◆ $validatorResolver

TYPO3 CMS Extbase Validation ValidatorResolver TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$validatorResolver
protected

◆ $view

◆ $viewResolver

ViewResolverInterface TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$viewResolver
private