Interface ContainerComponentFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for creating container component instances that need access to the
ComponentRegistry in order to instantiate and render child components.
Use this with MjmlConfiguration.Builder.registerContainerComponent(String, ContainerComponentFactory) for components that render nested MJML children (similar to
mj-section or mj-column).
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreate(MjmlNode node, GlobalContext globalContext, RenderContext renderContext, ComponentRegistry registry) Creates a container component instance from the given parsed node.
-
Method Details
-
create
BaseComponent create(MjmlNode node, GlobalContext globalContext, RenderContext renderContext, ComponentRegistry registry) Creates a container component instance from the given parsed node.- Parameters:
node- the parsed MJML node for the componentglobalContext- the document-wide context gathered during head processingrenderContext- the current rendering context (container width, position, etc.)registry- the component registry used to create and render child components- Returns:
- the created container component instance
-