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
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
$cacheService
protected
CacheService
$cacheService
$cObj
Set by UserContentObject (USER) via setContentObjectRenderer() in frontend
protected
ContentObjectRenderer|null
$cObj
= null
$configurationManager
protected
ConfigurationManagerInterface
$configurationManager
$container
protected
ContainerInterface
$container
$dispatcher
protected
Dispatcher
$dispatcher
$extbaseRequestBuilder
protected
RequestBuilder
$extbaseRequestBuilder
$persistenceManager
protected
PersistenceManagerInterface
$persistenceManager
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
ResponseInterfacehandleFrontendRequest()
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
stringinitialize()
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
Return values
ServerRequestInterfaceinitializeConfiguration()
Initializes the Object framework.
public
initializeConfiguration(array<string|int, mixed> $configuration, ServerRequestInterface $request) : ServerRequestInterface
Parameters
- $configuration : array<string|int, mixed>
- $request : ServerRequestInterface
Tags
Return values
ServerRequestInterfacerun()
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
setContentObjectRenderer()
Called for frontend plugins from UserContentObject via ContentObjectRenderer->callUserFunction().
public
setContentObjectRenderer(ContentObjectRenderer $cObj) : mixed
Parameters
- $cObj : ContentObjectRenderer
clearCacheOnError()
Clear cache of current page on error. Needed because we want a re-evaluation of the data.
protected
clearCacheOnError() : void
isExtbaseRequestCacheable()
protected
isExtbaseRequestCacheable(RequestInterface $extbaseRequest) : bool
Parameters
- $extbaseRequest : RequestInterface
Return values
boolresetSingletons()
Resets global singletons for the next plugin
protected
resetSingletons() : void