Group
extends DisplayItem
in package
implements
GroupInterface
Uses
HasDisplays
Class for a group of displays
Interfaces, Classes and Traits
- GroupInterface
- A group is a type of item, it can contains several displays
Table of Contents
- $dateCreated : DateTime
- $dateUpdated : DateTime
- $display_id : int
- $handle : string
- $hidden : bool
- $id : int
- $labelHidden : bool
- $labelVisuallyHidden : bool
- $name : string
- $uid : string
- $visuallyHidden : bool
- $_display : DisplayInterface
- $_displays : array<string|int, DisplayInterface>
- afterValidate() : mixed
- beforeRender() : bool
- Callback before rendering, returning false will skip the group rendering
- defineRules() : array<string|int, mixed>
- eagerLoad() : array<string|int, mixed>
- fields() : array<string|int, mixed>
- getAllDisplays() : array<string|int, mixed>
- getConfig() : array<string|int, mixed>
- Get project vonfig
- getDisplay() : DisplayInterface|null
- Display getter
- getDisplayByHandle() : DisplayInterface|null
- getDisplayByUid() : DisplayInterface|null
- getDisplays() : array<string|int, mixed>
- getDisplaysByHandles() : array<string|int, mixed>
- getDisplaysByUids() : array<string|int, mixed>
- getErrors() : mixed
- getHandle() : string
- getLayout() : LayoutInterface
- Layout getter
- getName() : string
- getTemplates() : array<string|int, string>
- Get available templates
- getType() : string
- getViewMode() : ViewModeInterface
- View mode getter
- getVisibleDisplays() : array<string|int, mixed>
- hasErrors() : bool
- isVisible() : bool
- render() : Markup
- Render this group
- setDisplay() : mixed
- Display setter
- setDisplays() : mixed
- loadDisplays() : array<string|int, mixed>
Properties
$dateCreated
public
DateTime
$dateCreated
$dateUpdated
public
DateTime
$dateUpdated
$display_id
public
int
$display_id
$handle
public
string
$handle
$hidden
public
bool
$hidden
= false
$id
public
int
$id
$labelHidden
public
bool
$labelHidden
= false
$labelVisuallyHidden
public
bool
$labelVisuallyHidden
= false
$name
public
string
$name
$uid
public
string
$uid
$visuallyHidden
public
bool
$visuallyHidden
= false
$_display
protected
DisplayInterface
$_display
$_displays
protected
array<string|int, DisplayInterface>
$_displays
Methods
afterValidate()
public
afterValidate() : mixed
Tags
Return values
mixed —beforeRender()
Callback before rendering, returning false will skip the group rendering
public
beforeRender() : bool
Tags
Return values
bool —defineRules()
public
defineRules() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —eagerLoad()
public
eagerLoad([string $prefix = '' ], int $level[, array<string|int, mixed> &$dependencies = [] ]) : array<string|int, mixed>
Parameters
- $prefix : string = ''
- $level : int
- $dependencies : array<string|int, mixed> = []
Tags
Return values
array<string|int, mixed> —fields()
public
fields() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getAllDisplays()
public
getAllDisplays() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getConfig()
Get project vonfig
public
getConfig() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getDisplay()
Display getter
public
getDisplay() : DisplayInterface|null
Tags
Return values
DisplayInterface|null —getDisplayByHandle()
public
getDisplayByHandle(string $handle[, bool $onlyRoots = true ][, bool $onlyVisibles = true ]) : DisplayInterface|null
Parameters
- $handle : string
- $onlyRoots : bool = true
- $onlyVisibles : bool = true
Tags
Return values
DisplayInterface|null —getDisplayByUid()
public
getDisplayByUid(string $uid[, bool $onlyRoots = true ][, bool $onlyVisibles = true ]) : DisplayInterface|null
Parameters
- $uid : string
- $onlyRoots : bool = true
- $onlyVisibles : bool = true
Tags
Return values
DisplayInterface|null —getDisplays()
public
getDisplays() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —getDisplaysByHandles()
public
getDisplaysByHandles(array<string|int, mixed> $handles[, bool $onlyRoots = true ][, bool $onlyVisibles = true ]) : array<string|int, mixed>
Parameters
- $handles : array<string|int, mixed>
- $onlyRoots : bool = true
- $onlyVisibles : bool = true
Tags
Return values
array<string|int, mixed> —getDisplaysByUids()
public
getDisplaysByUids(array<string|int, mixed> $uids[, bool $onlyRoots = true ][, bool $onlyVisibles = true ]) : array<string|int, mixed>
Parameters
- $uids : array<string|int, mixed>
- $onlyRoots : bool = true
- $onlyVisibles : bool = true
Tags
Return values
array<string|int, mixed> —getErrors()
public
getErrors([mixed $attribute = null ]) : mixed
Parameters
- $attribute : mixed = null
Tags
Return values
mixed —getHandle()
public
getHandle() : string
Tags
Return values
string —getLayout()
Layout getter
public
getLayout() : LayoutInterface
Tags
Return values
LayoutInterface —getName()
public
getName() : string
Tags
Return values
string —getTemplates()
Get available templates
public
getTemplates() : array<string|int, string>
Tags
Return values
array<string|int, string> —getType()
public
static getType() : string
Tags
Return values
string —getViewMode()
View mode getter
public
getViewMode() : ViewModeInterface
Tags
Return values
ViewModeInterface —getVisibleDisplays()
public
getVisibleDisplays() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —hasErrors()
public
hasErrors([mixed $attribute = null ]) : bool
Parameters
- $attribute : mixed = null
Tags
Return values
bool —isVisible()
public
isVisible() : bool
Tags
Return values
bool —render()
Render this group
public
render() : Markup
Tags
Return values
Markup —setDisplay()
Display setter
public
setDisplay(DisplayInterface $display) : mixed
Parameters
- $display : DisplayInterface
Tags
Return values
mixed —setDisplays()
public
setDisplays(array<string|int, mixed>|null $displays) : mixed
Parameters
- $displays : array<string|int, mixed>|null
Tags
Return values
mixed —loadDisplays()
protected
loadDisplays() : array<string|int, mixed>