Craft Themes (3.x)

HasDisplaysInterface

Interface for classes that have displays (view mode or groups for example)

Table of Contents

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
getVisibleDisplays()  : array<string|int, DisplayInterface>
Get all visible displays
setDisplays()  : mixed
Display setter

Methods

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

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>

Search results