Craft Themes (4.x)

RegionInterface

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

beforeRender()

Callback before rendering, returning false will skip the region rendering

public beforeRender() : bool
Return values
bool

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

Search results