class RenderData (View source)

DTO for rendering a Block.

$model is undefined when in a block editor context.

Methods

__construct(Block $block, string $editorName, array $children, TwillModelContract|null $model = null, string|null $parentEditorName = null, bool $inEditor = false)

No description

string
renderChildren(string $editorName, array $viewMapping = [], array $data = [])

No description

array
getChildrenFor(string $editorName, array $viewMapping = [], array $data = [])

No description

Details

__construct(Block $block, string $editorName, array $children, TwillModelContract|null $model = null, string|null $parentEditorName = null, bool $inEditor = false)

No description

Parameters

Block $block
string $editorName
array $children
TwillModelContract|null $model
string|null $parentEditorName
bool $inEditor

string renderChildren(string $editorName, array $viewMapping = [], array $data = [])

No description

Parameters

string $editorName
array $viewMapping
array $data

Return Value

string

array getChildrenFor(string $editorName, array $viewMapping = [], array $data = [])

No description

Parameters

string $editorName
array $viewMapping
array $data

Return Value

array