BlockRenderer
class BlockRenderer (View source)
This class can take either an Editor or a Cms array of data to render.
Based on the input it will build a rendering array (nested) based on the block classes.
A block class list may look like this:
TwoColumnsBlock
->children: [
TextBlock: [
ActionBlock
]
ImageBlock: [
]
]
Properties
Block[] | $rootBlocks | A list of root blocks. |
|
bool | $inEditor |
Methods
__construct(array $data)
No description
string
render(array $blockViewMappings = [], array $data = [])
No description
static BlockRenderer
fromCmsArray(array $data)
No description
mixed
__get(string $name)
No description
array
toArray()
No description
Details
__construct(array $data)
No description
string
render(array $blockViewMappings = [], array $data = [])
No description
static BlockRenderer
fromCmsArray(array $data)
No description
mixed
__get(string $name)
No description
array
toArray()
No description