AjaxWidgetComponent
class AjaxWidgetComponent implements ComponentInterface (View source)
A HTTP component specifically for Ajax widgets It's task is to interrupt the default dispatching as soon as possible if the current request is an AJAX request triggered by a Fluid widget (e.g. contains the arguments "widgetId" or "widgetContext").
Properties
protected ActionRequestFactory | $actionRequestFactory | ||
protected HashService | $hashService | ||
protected AjaxWidgetContextHolder | $ajaxWidgetContextHolder | ||
protected Context | $securityContext | ||
protected Dispatcher | $dispatcher |
Methods
Extracts the WidgetContext from the given $httpRequest.
Details
void
handle(ComponentContext $componentContext)
Check if the current request contains a widget context.
If so dispatch it directly, otherwise continue with the next HTTP component.
protected WidgetContext|null
extractWidgetContext(ServerRequestInterface $httpRequest)
Extracts the WidgetContext from the given $httpRequest.
If the request contains an argument "widgetId" the context is fetched from the session (AjaxWidgetContextHolder). Otherwise the argument "widgetContext" is expected to contain the serialized WidgetContext (protected by a HMAC suffix)