RenderComponentEvent implements StoppableEventInterface
FinalYes
Event to modify/replace the rendering behavior of Fluid components.
This can be used both to take over the whole rendering (by filling the $renderedContent property) and to introduce side effects while leaving the default rendering intact, like for embedding related frontent assets automatically. Also, both arguments and slots can be altered.
The event chain stops with the first listener that takes over the rendering completely. If no listener stops the chain, Fluid's default component rendering will be triggered afterwards.
Note that the provided parentRenderingContext must not be used to render child templates as this might have side effects on the parent template. Instead, a new rendering context (or a clone of the parent) must be used.
Tags
Table of Contents
Interfaces
- StoppableEventInterface
Methods
- __construct() : mixed
- getArguments() : array<string, mixed>
- getComponentCollection() : ViewHelperResolverDelegateInterface|ComponentDefinitionProviderInterface|ComponentTemplateResolverInterface
- getParentRenderingContext() : RenderingContextInterface
- getRenderedComponent() : string|null
- getRequest() : ServerRequestInterface|null
- getSlots() : array<string, callable>
- getViewHelperName() : string
- isPropagationStopped() : bool
- setArguments() : void
- setRenderedComponent() : void
- setSlots() : void
Methods
__construct()
public
__construct(ViewHelperResolverDelegateInterface|ComponentDefinitionProviderInterface|ComponentTemplateResolverInterface $componentCollection, string $viewHelperName, array<string, mixed> $arguments, array<string, callable> $slots, RenderingContextInterface $parentRenderingContext, ServerRequestInterface|null $request) : mixed
Parameters
- $componentCollection : ViewHelperResolverDelegateInterface|ComponentDefinitionProviderInterface|ComponentTemplateResolverInterface
- $viewHelperName : string
- $arguments : array<string, mixed>
- $slots : array<string, callable>
- $parentRenderingContext : RenderingContextInterface
- $request : ServerRequestInterface|null
getArguments()
public
getArguments() : array<string, mixed>
Return values
array<string, mixed>getComponentCollection()
public
getComponentCollection() : ViewHelperResolverDelegateInterface|ComponentDefinitionProviderInterface|ComponentTemplateResolverInterface
Return values
ViewHelperResolverDelegateInterface|ComponentDefinitionProviderInterface|ComponentTemplateResolverInterfacegetParentRenderingContext()
public
getParentRenderingContext() : RenderingContextInterface
Return values
RenderingContextInterfacegetRenderedComponent()
public
getRenderedComponent() : string|null
Return values
string|nullgetRequest()
public
getRequest() : ServerRequestInterface|null
Return values
ServerRequestInterface|nullgetSlots()
public
getSlots() : array<string, callable>
Return values
array<string, callable>getViewHelperName()
public
getViewHelperName() : string
Return values
stringisPropagationStopped()
public
isPropagationStopped() : bool
Return values
boolsetArguments()
public
setArguments(array<string, mixed> $arguments) : void
Parameters
- $arguments : array<string, mixed>
setRenderedComponent()
public
setRenderedComponent(string $renderedComponent) : void
Parameters
- $renderedComponent : string
setSlots()
public
setSlots(array<string, callable> $slots) : void
Parameters
- $slots : array<string, callable>