‪TYPO3CMS  11.5
TYPO3\CMS\Extbase\Mvc\Controller\ActionController Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\Controller\ActionController:
TYPO3\CMS\Extbase\Mvc\Controller\ControllerInterface ExtbaseTeam\ActionControllerArgumentTest\Controller\ArgumentTestController ExtbaseTeam\ActionControllerTest\Controller\TestController ExtbaseTeam\BlogExample\Controller\BlogController ExtbaseTeam\BlogExample\Controller\ContentController OliverHader\IrreTutorial\Controller\QueueController TYPO3\CMS\Belog\Controller\BackendLogController TYPO3\CMS\Beuser\Controller\BackendUserController 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\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\TestIrreForeignfield\Controller\AbstractController TYPO3\TestIrreForeignfield\Controller\QueueController TYPO3Fluid\FluidTest\Controller\TemplateController TYPO3Tests\ParentChildTranslation\Controller\MainController

Public Member Functions

 injectResponseFactory (ResponseFactoryInterface $responseFactory)
 
 injectStreamFactory (StreamFactoryInterface $streamFactory)
 
 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
 injectObjectManager (ObjectManagerInterface $objectManager)
 
 injectSignalSlotDispatcher (Dispatcher $signalSlotDispatcher)
 
 injectValidatorResolver (ValidatorResolver $validatorResolver)
 
 injectViewResolver (ViewResolverInterface $viewResolver)
 
 injectReflectionService (ReflectionService $reflectionService)
 
 injectHashService (HashService $hashService)
 
 injectMvcPropertyMappingConfigurationService (MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService)
 
 injectEventDispatcher (EventDispatcherInterface $eventDispatcher)
 
 injectPropertyMapper (PropertyMapper $propertyMapper)
 
 injectInternalFlashMessageService (FlashMessageService $flashMessageService)
 
 injectInternalExtensionService (ExtensionService $extensionService)
 
 initializeControllerArgumentsBaseValidators ()
 
ResponseInterface processRequest (RequestInterface $request)
 
ControllerContext getControllerContext ()
 
 addFlashMessage ($messageBody, $messageTitle='', $severity=AbstractMessage::OK, $storeInSession=true)
 
never forward ($actionName, $controllerName=null, $extensionName=null, ?array $arguments=null)
 
never throwStatus ($statusCode, $statusMessage=null, $content=null)
 

Protected Member Functions

 initializeView (ViewInterface $view)
 
 initializeAction ()
 
 initializeActionMethodArguments ()
 
 initializeActionMethodValidators ()
 
 renderAssetsForRequest ($request)
 
string resolveActionMethodName ()
 
 callActionMethod (RequestInterface $request)
 
ViewInterface resolveView ()
 
 setViewConfiguration (ViewInterface $view)
 
array getViewProperty ($extbaseFrameworkConfiguration, $setting)
 
ResponseInterface errorAction ()
 
 addErrorFlashMessage ()
 
string bool getErrorFlashMessage ()
 
ResponseInterface null forwardToReferringRequest ()
 
string getFlattenedValidationErrorMessage ()
 
 getFlashMessageQueue (?string $identifier=null)
 
ControllerContext buildControllerContext ()
 
never redirect ($actionName, $controllerName=null, $extensionName=null, ?array $arguments=null, $pageUid=null, $_=null, $statusCode=303)
 
never redirectToUri ($uri, $_=null, $statusCode=303)
 
string addBaseUriIfNecessary ($uri)
 
 mapRequestArgumentsToControllerArguments ()
 
ResponseInterface htmlResponse (?string $html=null)
 
ResponseInterface jsonResponse (?string $json=null)
 

Protected Attributes

ResponseFactoryInterface $responseFactory
 
StreamFactoryInterface $streamFactory
 
TYPO3 CMS Extbase Reflection ReflectionService $reflectionService
 
HashService $hashService
 
ViewInterface $view
 
string $defaultViewObjectName = TemplateView::class
 
string $actionMethodName = 'indexAction'
 
string $errorMethodName = 'errorAction'
 
TYPO3 CMS Extbase Mvc Controller MvcPropertyMappingConfigurationService $mvcPropertyMappingConfigurationService
 
EventDispatcherInterface $eventDispatcher
 
Request $request
 
TYPO3 CMS Extbase SignalSlot Dispatcher $signalSlotDispatcher
 
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
 
ControllerContext $controllerContext
 
ConfigurationManagerInterface $configurationManager
 

Private Member Functions

 setArgumentValue (Argument $argument, $rawValue)
 

Private Attributes

ViewResolverInterface $viewResolver
 
PropertyMapper $propertyMapper
 
FlashMessageService $internalFlashMessageService
 
ExtensionService $internalExtensionService
 

Detailed Description

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

Definition at line 64 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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 982 of file ActionController.php.

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

◆ addErrorFlashMessage()

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

If an error occurred during this request, this adds a flash message describing the error to the flash message container.

only to be used within Extbase, not part of TYPO3 Core API.

Reimplemented in ExtbaseTeam\ActionControllerArgumentTest\Controller\ArgumentTestController.

Definition at line 725 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addFlashMessage(), TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\getErrorFlashMessage().

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

◆ 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 828 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\getFlashMessageQueue().

Referenced by TYPO3\CMS\Extensionmanager\Controller\ListController\addComposerModeNotification(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addErrorFlashMessage(), TYPO3\CMS\Extbase\Tests\Unit\Mvc\Controller\ActionControllerTest\addFlashMessageThrowsExceptionOnInvalidMessageBody(), 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\Extensionmanager\Controller\UploadExtensionFileController\extractAction(), 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()

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

◆ callActionMethod()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::callActionMethod ( RequestInterface  $request)
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.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 537 of file ActionController.php.

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

◆ errorAction()

ResponseInterface 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
‪ResponseInterface

Definition at line 708 of file ActionController.php.

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

◆ forward()

never 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 | null$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
Returns
‪never
Exceptions
StopActionException
See also
redirect()
Deprecated:
‪since TYPO3 11.0, will be removed in 12.0

Definition at line 900 of file ActionController.php.

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

◆ forwardToReferringRequest()

ResponseInterface null 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!

Returns
‪ResponseInterface|null

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 756 of file ActionController.php.

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

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

◆ getControllerContext()

ControllerContext TYPO3\CMS\Extbase\Mvc\Controller\ActionController::getControllerContext ( )
Returns
ControllerContext
Deprecated:
‪since v11, will be removed with v12.

Definition at line 813 of file ActionController.php.

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

◆ getErrorFlashMessage()

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

only to be used within Extbase, not part of TYPO3 Core API.

Reimplemented in ExtbaseTeam\BlogExample\Controller\BlogController.

Definition at line 742 of file ActionController.php.

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

◆ getFlashMessageQueue()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::getFlashMessageQueue ( ?string  $identifier = null)
protected

todo: As soon as the incoming request contains the compiled plugin namespace, extbase will offer a trait to create a flash message identifier from the current request. Users then should inject the flash message service themselves if needed.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 852 of file ActionController.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addFlashMessage(), TYPO3\CMS\Form\Controller\FormManagerController\indexAction(), TYPO3\CMS\Form\Controller\FormEditorController\indexAction(), TYPO3\CMS\Extensionmanager\Controller\AbstractModuleController\initializeModuleTemplate(), and TYPO3\CMS\IndexedSearch\Controller\AdministrationController\initializeModuleTemplate().

◆ 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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 803 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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 683 of file ActionController.php.

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

◆ htmlResponse()

ResponseInterface TYPO3\CMS\Extbase\Mvc\Controller\ActionController::htmlResponse ( ?string  $html = null)
protected

Returns a response object with either the given html string or the current rendered view as content.

Parameters
string | null$html
Returns
‪ResponseInterface

Definition at line 1067 of file ActionController.php.

Referenced by ExtbaseTeam\ActionControllerTest\Controller\TestController\barAction(), TYPO3Fluid\FluidTest\Controller\TemplateController\baseTemplateAction(), ExtbaseTeam\ActionControllerTest\Controller\TestController\bazAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\compareAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\compareGroupsAction(), TYPO3\CMS\Extensionmanager\Controller\ExtensionComposerStatusController\detailAction(), ExtbaseTeam\BlogExample\Controller\BlogController\detailsAction(), TYPO3\CMS\Extensionmanager\Controller\ListController\distributionsAction(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\errorAction(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\externalDocumentsAction(), ExtbaseTeam\ActionControllerTest\Controller\TestController\fooAction(), TYPO3\CMS\Extensionmanager\Controller\UploadExtensionFileController\formAction(), TYPO3\CMS\IndexedSearch\Controller\SearchController\formAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\groupsAction(), TYPO3\CMS\Form\Controller\FormManagerController\indexAction(), TYPO3\CMS\Form\Controller\FormEditorController\indexAction(), TYPO3\CMS\Extensionmanager\Controller\ListController\indexAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\indexAction(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\indexAction(), ExtbaseTeam\ActionControllerArgumentTest\Controller\ArgumentTestController\inputPresetDtoAction(), ExtbaseTeam\ActionControllerArgumentTest\Controller\ArgumentTestController\inputPresetModelAction(), TYPO3\CMS\Extensionmanager\Controller\DownloadController\installFromTerAction(), TYPO3Tests\ParentChildTranslation\Controller\MainController\listAction(), ExtbaseTeam\BlogExample\Controller\BlogController\listAction(), TYPO3\CMS\Extensionmanager\Controller\ExtensionComposerStatusController\listAction(), TYPO3\CMS\Belog\Controller\BackendLogController\listAction(), TYPO3\CMS\FrontendLogin\Controller\LoginController\loginAction(), TYPO3\CMS\FrontendLogin\Controller\LoginController\logoutAction(), TYPO3\CMS\IndexedSearch\Controller\SearchController\noTypoScriptAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\onlineAction(), TYPO3\CMS\FrontendLogin\Controller\LoginController\overviewAction(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\pagesAction(), ExtbaseTeam\ActionControllerTest\Controller\TestController\quxAction(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\recoveryAction(), TYPO3\CMS\Extensionmanager\Controller\ActionController\removeExtensionAction(), TYPO3\CMS\Form\Controller\FormFrontendController\renderAction(), TYPO3\CMS\Form\Controller\FormEditorController\renderFormPageAction(), TYPO3\CMS\IndexedSearch\Controller\SearchController\searchAction(), TYPO3\CMS\Extensionmanager\Controller\DistributionController\showAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\showAction(), TYPO3\CMS\Extensionmanager\Controller\ListController\showAllVersionsAction(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\showChangePasswordAction(), TYPO3\CMS\FormCachingTests\Controller\FormCachingTestsController\somePerformAction(), TYPO3\CMS\FormCachingTests\Controller\FormCachingTestsController\someRenderAction(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\statisticAction(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\statisticDetailsAction(), TYPO3\CMS\Extensionmanager\Controller\ListController\terAction(), ExtbaseTeam\BlogExample\Controller\BlogController\testFormAction(), ExtbaseTeam\BlogExample\Controller\BlogController\testForwardTargetAction(), ExtbaseTeam\BlogExample\Controller\BlogController\testRelatedObjectAction(), TYPO3\CMS\Extensionmanager\Controller\ListController\unresolvedDependenciesAction(), ExtbaseTeam\ActionControllerArgumentTest\Controller\ArgumentTestController\validateDtoAction(), ExtbaseTeam\ActionControllerArgumentTest\Controller\ArgumentTestController\validateModelAction(), and TYPO3\CMS\IndexedSearch\Controller\AdministrationController\wordDetailAction().

◆ initializeAction()

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

◆ 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 335 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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 366 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.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 422 of file ActionController.php.

References $validator.

◆ initializeView()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::initializeView ( 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
ViewInterface$view‪The view to be initialized
Deprecated:
‪since v11, will be removed in v12: Drop method along with extbase ViewInterface.

Reimplemented in TYPO3\CMS\Beuser\Controller\BackendUserController.

Definition at line 314 of file ActionController.php.

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

◆ 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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 262 of file ActionController.php.

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

◆ injectInternalExtensionService()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectInternalExtensionService ( ExtensionService  $extensionService)
final

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 300 of file ActionController.php.

◆ injectInternalFlashMessageService()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectInternalFlashMessageService ( FlashMessageService  $flashMessageService)
final

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 292 of file ActionController.php.

◆ injectMvcPropertyMappingConfigurationService()

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

Definition at line 270 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
ObjectManagerInterface$objectManager

only to be used within Extbase, not part of TYPO3 Core API.

Deprecated:
‪since v11, will be removed in v12

Definition at line 214 of file ActionController.php.

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

◆ injectPropertyMapper()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectPropertyMapper ( PropertyMapper  $propertyMapper)
Parameters
PropertyMapper$propertyMapper

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 284 of file ActionController.php.

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

◆ injectReflectionService()

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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 253 of file ActionController.php.

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

◆ injectResponseFactory()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectResponseFactory ( ResponseFactoryInterface  $responseFactory)
final

◆ injectSignalSlotDispatcher()

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

only to be used within Extbase, not part of TYPO3 Core API.

Deprecated:
‪since v11, will be removed in v12

Definition at line 226 of file ActionController.php.

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

◆ injectStreamFactory()

TYPO3\CMS\Extbase\Mvc\Controller\ActionController::injectStreamFactory ( StreamFactoryInterface  $streamFactory)
final

◆ injectValidatorResolver()

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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 235 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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 244 of file ActionController.php.

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

◆ jsonResponse()

◆ 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 1015 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\setArgumentValue().

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

◆ processRequest()

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

Handles an incoming request and returns a response object

Parameters
\TYPO3\CMS\Extbase\Mvc\RequestInterface$request‪The request object
Returns
‪ResponseInterface

only to be used within Extbase, not part of TYPO3 Core API.

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, and TYPO3\TestIrreForeignfield\Controller\AbstractController.

Definition at line 441 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$request, TYPO3\CMS\Extbase\Mvc\Controller\ActionController\buildControllerContext(), TYPO3\CMS\Extbase\Mvc\Controller\ActionController\callActionMethod(), 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(), and TYPO3\CMS\Extbase\Mvc\Request\setDispatched().

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

◆ redirect()

never TYPO3\CMS\Extbase\Mvc\Controller\ActionController::redirect (   $actionName,
  $controllerName = null,
  $extensionName = null,
?array  $arguments = null,
  $pageUid = null,
  $_ = null,
  $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.

Parameters
string | null$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
null$_‪(optional) Unused
int$statusCode‪(optional) The HTTP status code for the redirect. Default is "303 See Other
Returns
‪never
Exceptions
StopActionException‪deprecated since TYPO3 11.0, method will RETURN a Core\Http\RedirectResponse instead of throwing in v12
Todo:
‪: ': ResponseInterface' (without ?) in v12 as method return type together with redirectToUri() cleanup

Definition at line 940 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\BackendUserController\addGroupToCompareListAction(), TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\changePasswordAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\compareAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\compareGroupsAction(), TYPO3\TestIrreForeignfield\Controller\ContentController\createAction(), TYPO3\TestIrreForeignfield\Controller\ContentController\deleteAction(), TYPO3\CMS\Form\Controller\FormManagerController\deleteAction(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\deleteIndexedItemAction(), 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\BackendUserController\removeAllFromCompareListAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\removeAllGroupsFromCompareListAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\removeFromCompareListAction(), TYPO3\CMS\Beuser\Controller\BackendUserController\removeGroupFromCompareListAction(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\saveStopwordsKeywordsAction(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\statisticDetailsAction(), TYPO3\CMS\Extensionmanager\Controller\ActionController\toggleExtensionInstallationStateAction(), TYPO3\TestIrreForeignfield\Controller\ContentController\updateAction(), and TYPO3\CMS\FrontendLogin\Controller\PasswordRecoveryController\validateIfHashHasExpired().

◆ redirectToUri()

never TYPO3\CMS\Extbase\Mvc\Controller\ActionController::redirectToUri (   $uri,
  $_ = null,
  $statusCode = 303 
)
protected

Redirects the web request to another uri.

Parameters
mixed$uri‪A string representation of a URI
null$_‪(optional) Unused
int$statusCode‪(optional) The HTTP status code for the redirect. Default is "303 See Other"
Returns
‪never
Exceptions
StopActionException‪deprecated since TYPO3 11.0, will be removed in 12.0
Todo:
‪: ': ResponseInterface' (without ?) in v12 as method return type together with redirectToUri() cleanup

Definition at line 966 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\addBaseUriIfNecessary().

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

◆ 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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 490 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 519 of file ActionController.php.

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

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

◆ resolveView()

ViewInterface TYPO3\CMS\Extbase\Mvc\Controller\ActionController::resolveView ( )
protected

Prepares a view for the current action. By default, this method tries to locate a view with a name matching the current action.

Returns
‪ViewInterface
Todo:
‪v12: Change signature to TYPO3Fluid\Fluid\View\ViewInterface when extbase ViewInterface is dropped.

only to be used within Extbase, not part of TYPO3 Core API.

Reimplemented in TYPO3\CMS\Extensionmanager\Controller\AbstractModuleController.

Definition at line 597 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$view, TYPO3\CMS\Extbase\Mvc\View\ViewInterface\assign(), TYPO3\CMS\Extbase\Mvc\View\ViewInterface\initializeView(), TYPO3\CMS\Extbase\Mvc\View\ViewInterface\setControllerContext(), and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\setViewConfiguration().

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

◆ setArgumentValue()

◆ setViewConfiguration()

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

only to be used within Extbase, not part of TYPO3 Core API.

Todo:
‪v12: Change signature to TYPO3Fluid\Fluid\View\ViewInterface when extbase ViewInterface is dropped.

Definition at line 636 of file ActionController.php.

References TYPO3\CMS\Extbase\Mvc\Controller\ActionController\$view, TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK, and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\getViewProperty().

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

◆ throwStatus()

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

Sends the specified HTTP status immediately and only stops to run back through the middleware stack. Note: If any other plugin or content or hook is used within a frontend request, this is skipped by design.

Parameters
int$statusCode‪The HTTP status code
string$statusMessage‪A custom HTTP status message
string$content‪Body content which further explains the status
Returns
‪never
Exceptions
PropagateResponseException

Definition at line 997 of file ActionController.php.

Member Data Documentation

◆ $actionMethodName

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

Name of the action method

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 108 of file ActionController.php.

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

◆ $arguments

◆ $configurationManager

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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 170 of file ActionController.php.

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

◆ $controllerContext

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

only to be used within Extbase, not part of TYPO3 Core API.

Deprecated:
‪since v11, will be removed with v12.

Definition at line 165 of file ActionController.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\buildControllerContext(), and TYPO3\CMS\Extbase\Mvc\Controller\ActionController\getControllerContext().

◆ $defaultViewObjectName

string TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$defaultViewObjectName = 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 101 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 114 of file ActionController.php.

◆ $eventDispatcher

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

◆ $hashService

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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 82 of file ActionController.php.

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

◆ $internalExtensionService

ExtensionService TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$internalExtensionService
private

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 185 of file ActionController.php.

◆ $internalFlashMessageService

FlashMessageService TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$internalFlashMessageService
private

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 180 of file ActionController.php.

◆ $mvcPropertyMappingConfigurationService

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

◆ $objectManager

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

only to be used within Extbase, not part of TYPO3 Core API.

Deprecated:
‪since v11, will be removed in v12

Definition at line 140 of file ActionController.php.

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

◆ $propertyMapper

PropertyMapper TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$propertyMapper
private

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 175 of file ActionController.php.

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

◆ $reflectionService

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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 77 of file ActionController.php.

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

◆ $request

◆ $responseFactory

ResponseFactoryInterface TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$responseFactory
protected

◆ $settings

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

Contains the settings of the current extension

Definition at line 150 of file ActionController.php.

◆ $signalSlotDispatcher

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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 134 of file ActionController.php.

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

◆ $streamFactory

StreamFactoryInterface TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$streamFactory
protected

◆ $uriBuilder

TYPO3 CMS Extbase Mvc Web Routing UriBuilder TYPO3\CMS\Extbase\Mvc\Controller\ActionController::$uriBuilder
protected

◆ $validatorResolver

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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 155 of file ActionController.php.

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

◆ $view

◆ $viewResolver

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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 87 of file ActionController.php.

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