Bootstrap

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

Attributes

#[Autoconfigure]
$public: true
$shared: false

Table of Contents

Properties

$cacheService  : CacheService
$cObj  : ContentObjectRenderer|null
$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()  : void
The current (!) cObj.
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 read-only

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

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

Return values

string

initialize()

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

public initialize(array $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

The TS configuration array

$request : ServerRequestInterface

Tags

throws
RuntimeException
see
run()

Return values

ServerRequestInterface

initializeConfiguration()

Initializes the Object framework.

public initializeConfiguration(array $configuration, ServerRequestInterface $request) : ServerRequestInterface

Parameters

$configuration : array
$request : ServerRequestInterface

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 $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

The TS configuration array

$request : ServerRequestInterface

the incoming server request

Attributes

#[AsAllowedCallable]

Return values

string —

$content The processed content

setContentObjectRenderer()

The current (!) cObj.

public setContentObjectRenderer(ContentObjectRenderer $cObj) : void

Called for frontend plugins from UserContentObject via ContentObjectRenderer->callUserFunction().

Parameters

$cObj : ContentObjectRenderer

clearCacheOnError()

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

protected clearCacheOnError(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface

resetSingletons()

Resets global singletons for the next plugin

protected resetSingletons() : void
On this page