ViewModeInterface
extends
HasDisplaysInterface
in
A view mode has displays associated to it, it's associated to a layout.
One layout can have several view modes.
Table of Contents
- addDisplay() : mixed
- Add a display to this view mode
- eagerLoad() : array<string|int, string>
- Eager load fields
- getAllDisplays() : array<string|int, DisplayInterface>
- Returns all displays, in groups or not
- getConfig() : array<string|int, mixed>
- Get project config
- 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
- getLayout() : LayoutInterface
- Get layout object
- getVisibleDisplays() : array<string|int, DisplayInterface>
- Get all visible displays
- setDisplays() : mixed
- Display setter
- setLayout() : mixed
- Layout setter
Methods
addDisplay()
Add a display to this view mode
public
addDisplay(DisplayInterface $display) : mixed
Parameters
- $display : DisplayInterface
Return values
mixed —eagerLoad()
Eager load fields
public
eagerLoad([string $prefix = '' ], int $level[, array<string|int, string> &$dependencies = [] ]) : array<string|int, string>
Parameters
- $prefix : string = ''
- $level : int
- $dependencies : array<string|int, string> = []
-
cache tags
Return values
array<string|int, string> —getAllDisplays()
Returns all displays, in groups or not
public
getAllDisplays() : array<string|int, DisplayInterface>
Return values
array<string|int, DisplayInterface> —getConfig()
Get project config
public
getConfig() : array<string|int, mixed>
Return values
array<string|int, mixed> —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> —getLayout()
Get layout object
public
getLayout() : LayoutInterface
Return values
LayoutInterface —getVisibleDisplays()
Get all visible displays
public
getVisibleDisplays() : array<string|int, DisplayInterface>
Return values
array<string|int, DisplayInterface> —setDisplays()
Display setter
public
setDisplays(null|array<string|int, DisplayInterface> $displays) : mixed
Parameters
- $displays : null|array<string|int, DisplayInterface>
Return values
mixed —setLayout()
Layout setter
public
setLayout(LayoutInterface $layout) : mixed
Parameters
- $layout : LayoutInterface