Craft Themes (3.x)

FileDisplayerService extends Service
in package

Table of Contents

EVENT_DEFAULT_DISPLAYERS  = 'default_displayer'
EVENT_KIND_TARGETS  = 'kind_targets'
EVENT_REGISTER_DISPLAYERS  = 'register_displayer'
$_defaults  : array<string|int, string>
$_displayers  : array<string|int, string>
$_kindTargets  : array<string|int, mixed>
getAll()  : array<string|int, mixed>
Displayers getter
getByHandle()  : FileDisplayerInterface
Get a displayer by handle
getClassByHandle()  : string
Get a displayer class by handle
getDefaults()  : array<string|int, string>
Get default displayers, indexed by kind
getForKind()  : array<string|int, FileDisplayerInterface>
Get displayers for an asset kind
getKindTargets()  : array<string|int, string>
Get the kind targets for an displayer handle
_getKindTargets()  : array<string|int, mixed>
Resolve an array of kinds, changing '*' to all defined kinds
blockCacheService()  : BlockCacheService
Get the block cache service
blockProviderService()  : BlockProvidersService
Get the block providers service
blocksService()  : BlockService
Get the blocks service
displayService()  : DisplayService
Get the display service
eagerLoadingService()  : EagerLoadingService
Get the eager loading service
fieldDisplayersService()  : FieldDisplayerService
Get the field displayers service
fieldsService()  : FieldsService
Get the fields service
fileDisplayerService()  : FileDisplayerService
Get the file displayers service
getByHandles()  : array<string|int, FileDisplayerInterface>
Get displayers by handles
groupsService()  : GroupsService
Get the groups service
isDisplayerValidForKind()  : bool
Is a displayer valid for a kind
layoutService()  : LayoutService
Get the layout service
matrixService()  : MatrixService
Get the matrix service
register()  : mixed
Registers displayers
registerDefaults()  : mixed
Register default displayers
registerTargets()  : mixed
Register asset kind targets
themesRegistry()  : ThemesRegistry
Get the themes registry
triggerEvent()  : mixed
Triggers an event
viewModesService()  : ViewModeService
Get the view mode service
viewService()  : ViewService
Get the view service

Constants

Properties

Methods

getAll()

Displayers getter

public getAll() : array<string|int, mixed>
Return values
array<string|int, mixed>

getClassByHandle()

Get a displayer class by handle

public getClassByHandle(string $handle) : string
Parameters
$handle : string
Tags
throws
FieldDisplayerException
Return values
string

getDefaults()

Get default displayers, indexed by kind

public getDefaults() : array<string|int, string>
Return values
array<string|int, string>

getKindTargets()

Get the kind targets for an displayer handle

public getKindTargets(string $displayerHandle) : array<string|int, string>
Parameters
$displayerHandle : string
Return values
array<string|int, string>

_getKindTargets()

Resolve an array of kinds, changing '*' to all defined kinds

protected _getKindTargets(array<string|int, mixed> $kinds) : array<string|int, mixed>
Parameters
$kinds : array<string|int, mixed>
Return values
array<string|int, mixed>

isDisplayerValidForKind()

Is a displayer valid for a kind

protected isDisplayerValidForKind(string $displayerHandle, string $kind) : bool
Parameters
$displayerHandle : string
$kind : string
Return values
bool

matrixService()

Get the matrix service

protected matrixService() : MatrixService
Return values
MatrixService

registerDefaults()

Register default displayers

protected registerDefaults() : mixed
Return values
mixed

registerTargets()

Register asset kind targets

protected registerTargets(string $displayerHandle) : mixed
Parameters
$displayerHandle : string
Return values
mixed

triggerEvent()

Triggers an event

protected triggerEvent(string $type, Event $event) : mixed
Parameters
$type : string
$event : Event
Return values
mixed

Search results