HasDisplays
Trait to be used for classes that contains displays (view modes or groups for instance)
Table of Contents
- $_displays : array<string|int, DisplayInterface>
- afterValidate() : mixed
- getDisplayByHandle() : DisplayInterface|null
- getDisplayByUid() : DisplayInterface|null
- getDisplays() : array<string|int, mixed>
- getDisplaysByHandles() : array<string|int, mixed>
- getDisplaysByUids() : array<string|int, mixed>
- getErrors() : mixed
- getVisibleDisplays() : array<string|int, mixed>
- hasErrors() : mixed
- setDisplays() : mixed
- loadDisplays() : array<string|int, mixed>
- Load displays from db
Properties
$_displays
protected
array<string|int, DisplayInterface>
$_displays
Methods
afterValidate()
public
afterValidate() : mixed
Tags
Return values
mixed —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 —getVisibleDisplays()
public
getVisibleDisplays() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —hasErrors()
public
hasErrors([mixed $attribute = null ]) : mixed
Parameters
- $attribute : mixed = null
Tags
Return values
mixed —setDisplays()
public
abstract setDisplays(array<string|int, mixed>|null $displays) : mixed
Parameters
- $displays : array<string|int, mixed>|null
Tags
Return values
mixed —loadDisplays()
Load displays from db
protected
abstract loadDisplays() : array<string|int, mixed>