RegionInterface
in
Regions are defined by themes, and are assigned to layouts. They can have blocks.
Table of Contents
- addBlock() : mixed
- Add a block to this region
- beforeRender() : bool
- Callback before rendering, returning false will skip the region rendering
- getBlocks() : array<string|int, BlockInterface>
- Blocks getter
- getTemplates() : array<string|int, string>
- Get available templates
- getTheme() : ThemeInterface
- Theme getter
- getVisibleBlocks() : array<string|int, BlockInterface>
- Get visible blocks
- hasBlocks() : bool
- Does this region have blocks
- hasVisibleBlocks() : bool
- Does this region have visible blocks
- render() : Markup
- Render this region
- setBlocks() : mixed
- Blocks setter
Methods
addBlock()
Add a block to this region
public
addBlock(BlockInterface $block) : mixed
Parameters
- $block : BlockInterface
Return values
mixed —beforeRender()
Callback before rendering, returning false will skip the region rendering
public
beforeRender() : bool
Return values
bool —getBlocks()
Blocks getter
public
getBlocks() : array<string|int, BlockInterface>
Return values
array<string|int, BlockInterface> —getTemplates()
Get available templates
public
getTemplates(LayoutInterface $layout) : array<string|int, string>
Parameters
- $layout : LayoutInterface
Return values
array<string|int, string> —getTheme()
Theme getter
public
getTheme() : ThemeInterface
Return values
ThemeInterface —getVisibleBlocks()
Get visible blocks
public
getVisibleBlocks() : array<string|int, BlockInterface>
Return values
array<string|int, BlockInterface> —hasBlocks()
Does this region have blocks
public
hasBlocks() : bool
Return values
bool —hasVisibleBlocks()
Does this region have visible blocks
public
hasVisibleBlocks() : bool
Return values
bool —render()
Render this region
public
render() : Markup
Return values
Markup —setBlocks()
Blocks setter
public
setBlocks(array<string|int, BlockInterface>|null $blocks) : mixed
Parameters
- $blocks : array<string|int, BlockInterface>|null