final class LegacyFusionControllerContext (View source)

deprecated with Neos 9.0 can be removed with 10

internal  
 

Legacy stub to replace the original {ControllerContext} inside Fusion {Runtime::getControllerContext()}.

The concept of the controller context inside Fusion has been deprecated.

You should definitely not pass this object along further, which will also most likely not work as it doesn't satisfy the constraint of instanceof ControllerContext!

To migrate the use case of fetching the active request, please look into {\Neos\Fusion\Core\FusionGlobals::get()} instead. By convention, an {\Neos\Flow\Mvc\ActionRequest} will be available as request:

$actionRequest = $this->runtime->fusionGlobals->get('request');
if (!$actionRequest instanceof ActionRequest) {
    // fallback or error
}

To get an {\Neos\Flow\Mvc\Routing\UriBuilder} proceed with:

$uriBuilder = new UriBuilder();
$uriBuilder->setRequest($actionRequest);

WARNING regarding {\Neos\Fusion\Core\Runtime::getControllerContext()}: Invoking this backwards-compatible layer is possibly unsafe, if the rendering was not started in {\Neos\Fusion\Core\self::renderResponse()} or no request global is available. This will raise an exception.

Properties

protected FlashMessageService $flashMessageService

Methods

__construct(ActionRequest $request, ActionResponse $legacyActionResponseForCurrentRendering)

No description

ActionRequest
getRequest() deprecated

To migrate the use case of fetching the active request, please look into {FusionGlobals::get()} instead.

UriBuilder
getUriBuilder() deprecated

To migrate the use case of getting the UriBuilder please use this instead:

FlashMessageContainer
getFlashMessageContainer() deprecated

To migrate this use case please use {FlashMessageService::getFlashMessageContainerForRequest()} in combination with fetching the active request as described here {getRequest} instead.

ActionResponse
getResponse() deprecated

PURELY INTERNAL with partially undefined behaviour!!!

Details

__construct(ActionRequest $request, ActionResponse $legacyActionResponseForCurrentRendering)

No description

Parameters

ActionRequest $request
ActionResponse $legacyActionResponseForCurrentRendering

ActionRequest getRequest() deprecated

deprecated with Neos 9.0 can be removed with 10

To migrate the use case of fetching the active request, please look into {FusionGlobals::get()} instead.

By convention, an {\Neos\Flow\Mvc\ActionRequest} will be available as request:

$actionRequest = $this->runtime->fusionGlobals->get('request'); if (!$actionRequest instanceof ActionRequest) { // fallback or error }

Return Value

ActionRequest

UriBuilder getUriBuilder() deprecated

deprecated with Neos 9.0 can be removed with 10

To migrate the use case of getting the UriBuilder please use this instead:

$actionRequest = $this->runtime->fusionGlobals->get('request'); if (!$actionRequest instanceof ActionRequest) { // fallback or error } $uriBuilder = new UriBuilder(); $uriBuilder->setRequest($actionRequest);

Return Value

UriBuilder

FlashMessageContainer getFlashMessageContainer() deprecated

deprecated with Neos 9.0 can be removed with 10

To migrate this use case please use {FlashMessageService::getFlashMessageContainerForRequest()} in combination with fetching the active request as described here {getRequest} instead.

Return Value

FlashMessageContainer

ActionResponse getResponse() deprecated

deprecated with Neos 9.0 can be removed with 10

internal  THIS SHOULD NEVER BE CALLED ON USER-LAND
 

PURELY INTERNAL with partially undefined behaviour!!!

Gives access to the legacy mutable action response simulation {[\Neos\Fusion\Core\Runtime::withSimulatedLegacyControllerContext()}

Initially](../../../Neos/Fusion/Core/Runtime.html) it was possible to mutate the current response of the active MVC controller through this getter.

While HIGHLY internal behaviour and ONLY to be used by Neos.Fusion.Form or Neos.Neos:Plugin this legacy layer is in place to still allow this functionality.

Return Value

ActionResponse