GroupInterface
extends
HasDisplaysInterface
in
A group is a type of item, it can contains several displays
Table of Contents
- beforeRender() : bool
- Callback before rendering, returning false will skip the group rendering
- getAllDisplays() : array<string|int, DisplayInterface>
- Returns all displays, in groups or not
- getDisplayByHandle() : DisplayInterface|null
- Fetch a display by handle Returns a field or a group type of display
- getDisplayByUid() : DisplayInterface|null
- Fetch a display by uid Returns a field or a group type of display
- getDisplays() : array<string|int, DisplayInterface>
- Displays getter, will only fetch the root displays (that aren't in groups)
- getDisplaysByHandles() : array<string|int, DisplayInterface>
- Fetch displays by handles
- getDisplaysByUids() : array<string|int, DisplayInterface>
- Fetch displays by uids
- getTemplates() : array<string|int, string>
- Get available templates
- getVisibleDisplays() : array<string|int, DisplayInterface>
- Get all visible displays
- render() : Markup
- Render this group
- setDisplays() : mixed
- Display setter
Methods
beforeRender()
Callback before rendering, returning false will skip the group rendering
public
beforeRender() : bool
Return values
bool —getAllDisplays()
Returns all displays, in groups or not
public
getAllDisplays() : array<string|int, DisplayInterface>
Return values
array<string|int, DisplayInterface> —getDisplayByHandle()
Fetch a display by handle Returns a field or a group type of display
public
getDisplayByHandle(string $handle[, bool $onlyRoots = true ][, bool $onlyVisibles = true ]) : DisplayInterface|null
Parameters
- $handle : string
- $onlyRoots : bool = true
-
Only look at root displays (not in groups)
- $onlyVisibles : bool = true
-
Only look at visible displays
Return values
DisplayInterface|null —getDisplayByUid()
Fetch a display by uid Returns a field or a group type of display
public
getDisplayByUid(string $uid[, bool $onlyRoots = true ][, bool $onlyVisibles = true ]) : DisplayInterface|null
Parameters
- $uid : string
- $onlyRoots : bool = true
-
Only look at root displays (not in groups)
- $onlyVisibles : bool = true
-
Only look at visible displays
Return values
DisplayInterface|null —getDisplays()
Displays getter, will only fetch the root displays (that aren't in groups)
public
getDisplays() : array<string|int, DisplayInterface>
Return values
array<string|int, DisplayInterface> —getDisplaysByHandles()
Fetch displays by handles
public
getDisplaysByHandles(array<string|int, string> $handles[, bool $onlyRoots = true ][, bool $onlyVisibles = true ]) : array<string|int, DisplayInterface>
Parameters
- $handles : array<string|int, string>
- $onlyRoots : bool = true
-
Only look at root displays (not in groups)
- $onlyVisibles : bool = true
-
Only look at visible displays
Return values
array<string|int, DisplayInterface> —getDisplaysByUids()
Fetch displays by uids
public
getDisplaysByUids(array<string|int, string> $uids[, bool $onlyRoots = true ][, bool $onlyVisibles = true ]) : array<string|int, DisplayInterface>
Parameters
- $uids : array<string|int, string>
- $onlyRoots : bool = true
-
Only look at root displays (not in groups)
- $onlyVisibles : bool = true
-
Only look at visible displays
Return values
array<string|int, DisplayInterface> —getTemplates()
Get available templates
public
getTemplates() : array<string|int, string>
Return values
array<string|int, string> —getVisibleDisplays()
Get all visible displays
public
getVisibleDisplays() : array<string|int, DisplayInterface>
Return values
array<string|int, DisplayInterface> —render()
Render this group
public
render() : Markup
Return values
Markup —setDisplays()
Display setter
public
setDisplays(null|array<string|int, DisplayInterface> $displays) : mixed
Parameters
- $displays : null|array<string|int, DisplayInterface>