Bootstrap

Creates a request and dispatches it to the controller which was specified by TS Setup and returns the content.

This class is the main entry point for extbase extensions.

Tags
todo:

Please note that this class will become internal in TYPO3 v13.0

Table of Contents

Properties

$cacheService  : CacheService
$cObj  : ContentObjectRenderer|null
Set by UserContentObject (USER) via setContentObjectRenderer() in frontend
$configurationManager  : ConfigurationManagerInterface
$container  : ContainerInterface
$dispatcher  : Dispatcher
$extbaseRequestBuilder  : RequestBuilder
$persistenceManager  : PersistenceManagerInterface

Methods

__construct()  : mixed
handleBackendRequest()  : ResponseInterface
Entrypoint for backend modules, handling PSR-7 requests/responses.
handleFrontendRequest()  : string
Used for any Extbase Plugin in the Frontend, be sure to run $this->initialize() before.
initialize()  : ServerRequestInterface
Explicitly initializes all necessary Extbase objects by invoking the various initialize* methods.
initializeConfiguration()  : ServerRequestInterface
Initializes the Object framework.
run()  : string
Runs the Extbase Framework by resolving an appropriate Request Handler and passing control to it.
setContentObjectRenderer()  : mixed
Called for frontend plugins from UserContentObject via ContentObjectRenderer->callUserFunction().
clearCacheOnError()  : void
Clear cache of current page on error. Needed because we want a re-evaluation of the data.
isExtbaseRequestCacheable()  : bool
resetSingletons()  : void
Resets global singletons for the next plugin

Properties

$container

protected ContainerInterface $container

Methods

__construct()

public __construct(ContainerInterface $container, ConfigurationManagerInterface $configurationManager, PersistenceManagerInterface $persistenceManager, CacheService $cacheService, Dispatcher $dispatcher, RequestBuilder $extbaseRequestBuilder) : mixed
Parameters
$container : ContainerInterface
$configurationManager : ConfigurationManagerInterface
$persistenceManager : PersistenceManagerInterface
$cacheService : CacheService
$dispatcher : Dispatcher
$extbaseRequestBuilder : RequestBuilder

handleBackendRequest()

Entrypoint for backend modules, handling PSR-7 requests/responses.

public handleBackendRequest(ServerRequestInterface $request) : ResponseInterface

Creates an Extbase Request, dispatches it and then returns the Response

Parameters
$request : ServerRequestInterface
Internal
Return values
ResponseInterface

handleFrontendRequest()

Used for any Extbase Plugin in the Frontend, be sure to run $this->initialize() before.

public handleFrontendRequest(ServerRequestInterface $request) : string
Parameters
$request : ServerRequestInterface
Internal
Return values
string

initialize()

Explicitly initializes all necessary Extbase objects by invoking the various initialize* methods.

public initialize(array<string|int, mixed> $configuration, ServerRequestInterface $request) : ServerRequestInterface

Usually this method is only called from unit tests or other applications which need a more fine-grained control over the initialization and request handling process. Most other applications just call the run() method.

Parameters
$configuration : array<string|int, mixed>

The TS configuration array

$request : ServerRequestInterface
Tags
throws
RuntimeException
see
run()
Return values
ServerRequestInterface

initializeConfiguration()

Initializes the Object framework.

public initializeConfiguration(array<string|int, mixed> $configuration, ServerRequestInterface $request) : ServerRequestInterface
Parameters
$configuration : array<string|int, mixed>
$request : ServerRequestInterface
Internal
Tags
see
initialize()
Return values
ServerRequestInterface

run()

Runs the Extbase Framework by resolving an appropriate Request Handler and passing control to it.

public run(string $content, array<string|int, mixed> $configuration, ServerRequestInterface $request) : string

If the Framework is not initialized yet, it will be initialized.

This is usually used in Frontend plugins. This method will be marked as internal in the future, use EXTBASEPLUGIN in TypoScript to execute an Extbase plugin instead.

Parameters
$content : string

The content. Not used

$configuration : array<string|int, mixed>

The TS configuration array

$request : ServerRequestInterface

the incoming server request

Return values
string

$content The processed content

clearCacheOnError()

Clear cache of current page on error. Needed because we want a re-evaluation of the data.

protected clearCacheOnError() : void

resetSingletons()

Resets global singletons for the next plugin

protected resetSingletons() : void

        
On this page

Search results