Craft Themes (3.x)

Display extends Model
in package
implements DisplayInterface

Interfaces, Classes and Traits

DisplayInterface
A display is assigned to a view mode, it has an `item` which can be a field or a group

Table of Contents

$dateCreated  : DateTime
$dateUpdated  : DateTime
$group_id  : int
$id  : int
$order  : int
$type  : string
$uid  : string
$viewMode_id  : int
$_group  : GroupInterface
$_item  : DisplayItemInterface
$_viewMode  : ViewModeInterface
afterValidate()  : mixed
defineRules()  : array<string|int, mixed>
fields()  : mixed
getConfig()  : array<string|int, mixed>
Get project config
getErrors()  : mixed
getGroup()  : GroupInterface|null
Group getter
getHandle()  : string
Get the display's item handle
getItem()  : DisplayItemInterface
Item getter
getLayout()  : LayoutInterface
Layout getter
getName()  : string
Get the display's item name
getViewMode()  : ViewModeInterface
View mode interface
hasErrors()  : mixed
isGroup()  : bool
Is this display a group
render()  : Markup
Render this display
setGroup()  : mixed
Group setter
setItem()  : mixed
Item setter
setViewMode()  : mixed
View mode setter

Properties

$dateCreated

public DateTime $dateCreated

$dateUpdated

public DateTime $dateUpdated

$viewMode_id

public int $viewMode_id

Methods

afterValidate()

public afterValidate() : mixed
Tags
inheritDoc
Return values
mixed

defineRules()

public defineRules() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

fields()

public fields() : mixed
Tags
inheritDoc
Return values
mixed

getConfig()

Get project config

public getConfig() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

getErrors()

public getErrors([mixed $attribute = null ]) : mixed
Parameters
$attribute : mixed = null
Tags
inheritDoc
Return values
mixed

getHandle()

Get the display's item handle

public getHandle() : string
Tags
inheritDoc
Return values
string

getName()

Get the display's item name

public getName() : string
Tags
inheritDoc
Return values
string

hasErrors()

public hasErrors([mixed $attribute = null ]) : mixed
Parameters
$attribute : mixed = null
Tags
inheritDoc
Return values
mixed

isGroup()

Is this display a group

public isGroup() : bool
Tags
inheritDoc
Return values
bool

render()

Render this display

public render([array<string|int, mixed> $params = [] ]) : Markup
Parameters
$params : array<string|int, mixed> = []

Parameters forwarded to display's item render method

Tags
inheritDoc
Return values
Markup

Search results