Craft Themes (4.x)

ThemePreferences extends Component
in package
implements ThemePreferencesInterface

Default class for all theme preferences

Interfaces, Classes and Traits

ThemePreferencesInterface
Each theme define some preferences which control the classes and attributes of the page elements when they are rendered.

Table of Contents

$view  : ViewService
getBlockAttributes()  : array<string|int, string>
Get block attributes
getBlockClasses()  : array<string|int, string>
Get block classes
getFieldAttributes()  : array<string|int, string>
Get field attributes
getFieldClasses()  : array<string|int, string>
Get field classes
getFieldContainerAttributes()  : array<string|int, string>
Get field container attributes
getFieldContainerClasses()  : array<string|int, string>
Get field container classes
getFieldLabelAttributes()  : array<string|int, string>
Get field label attributes
getFieldLabelClasses()  : array<string|int, string>
Get field label classes
getFileAttributes()  : array<string|int, string>
Get file attributes
getFileClasses()  : array<string|int, string>
Get file classes
getGroupAttributes()  : array<string|int, string>
Get group attributes
getGroupClasses()  : array<string|int, string>
Get group classes
getGroupContainerAttributes()  : array<string|int, string>
Get group container attributes
getGroupContainerClasses()  : array<string|int, string>
Get group container classes
getGroupLabelAttributes()  : array<string|int, string>
Get group container classes
getGroupLabelClasses()  : array<string|int, string>
Get group label classes
getLayoutAttributes()  : array<string|int, string>
Get layout attributes
getLayoutClasses()  : array<string|int, string>
Get layout classes
getRegionAttributes()  : array<string|int, string>
Get region attributes
getRegionClasses()  : array<string|int, string>
Get region classes
init()  : void
getElement()  : Element|null
Element getter
getLayout()  : LayoutInterface
Layout getter
getRegion()  : RegionInterface
Region getter
getViewMode()  : ViewModeInterface
View mode getter

Properties

Methods

getBlockAttributes()

Get block attributes

public getBlockAttributes(BlockInterface $block) : array<string|int, string>
Parameters
$block : BlockInterface
Tags
inheritDoc
Return values
array<string|int, string>

getFieldAttributes()

Get field attributes

public getFieldAttributes(FieldInterface $field) : array<string|int, string>
Parameters
$field : FieldInterface
Tags
inheritDoc
Return values
array<string|int, string>

getFieldContainerAttributes()

Get field container attributes

public getFieldContainerAttributes(FieldInterface $field) : array<string|int, string>
Parameters
$field : FieldInterface
Tags
inheritDoc
Return values
array<string|int, string>

getFieldContainerClasses()

Get field container classes

public getFieldContainerClasses(FieldInterface $field) : array<string|int, string>
Parameters
$field : FieldInterface
Tags
inheritDoc
Return values
array<string|int, string>

getFieldLabelAttributes()

Get field label attributes

public getFieldLabelAttributes(FieldInterface $field) : array<string|int, string>
Parameters
$field : FieldInterface
Tags
inheritDoc
Return values
array<string|int, string>

getFieldLabelClasses()

Get field label classes

public getFieldLabelClasses(FieldInterface $field) : array<string|int, string>
Parameters
$field : FieldInterface
Tags
inheritDoc
Return values
array<string|int, string>

getGroupAttributes()

Get group attributes

public getGroupAttributes(GroupInterface $group) : array<string|int, string>
Parameters
$group : GroupInterface
Tags
inheritDoc
Return values
array<string|int, string>

getGroupContainerAttributes()

Get group container attributes

public getGroupContainerAttributes(GroupInterface $group) : array<string|int, string>
Parameters
$group : GroupInterface
Tags
inheritDoc
Return values
array<string|int, string>

getGroupContainerClasses()

Get group container classes

public getGroupContainerClasses(GroupInterface $group) : array<string|int, string>
Parameters
$group : GroupInterface
Tags
inheritDoc
Return values
array<string|int, string>

getGroupLabelAttributes()

Get group container classes

public getGroupLabelAttributes(GroupInterface $group) : array<string|int, string>
Parameters
$group : GroupInterface
Tags
inheritDoc
Return values
array<string|int, string>

getGroupLabelClasses()

Get group label classes

public getGroupLabelClasses(GroupInterface $group) : array<string|int, string>
Parameters
$group : GroupInterface
Tags
inheritDoc
Return values
array<string|int, string>

getLayoutAttributes()

Get layout attributes

public getLayoutAttributes(LayoutInterface $layout[, bool $root = false ]) : array<string|int, string>
Parameters
$layout : LayoutInterface
$root : bool = false

true if we're rendering a page template

Tags
inheritDoc
Return values
array<string|int, string>

getLayoutClasses()

Get layout classes

public getLayoutClasses(LayoutInterface $layout[, bool $root = false ]) : array<string|int, string>
Parameters
$layout : LayoutInterface
$root : bool = false

true if we're rendering a page template

Tags
inheritDoc
Return values
array<string|int, string>

getElement()

Element getter

protected getElement() : Element|null
Return values
Element|null

Search results