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
EVENT_DEFAULT_DISPLAYERS
public
mixed
EVENT_DEFAULT_DISPLAYERS
= 'default_displayer'
EVENT_KIND_TARGETS
public
mixed
EVENT_KIND_TARGETS
= 'kind_targets'
EVENT_REGISTER_DISPLAYERS
public
mixed
EVENT_REGISTER_DISPLAYERS
= 'register_displayer'
Properties
$_defaults
protected
array<string|int, string>
$_defaults
$_displayers
protected
array<string|int, string>
$_displayers
$_kindTargets
protected
array<string|int, mixed>
$_kindTargets
= []
Methods
getAll()
Displayers getter
public
getAll() : array<string|int, mixed>
Return values
array<string|int, mixed> —getByHandle()
Get a displayer by handle
public
getByHandle(string $handle) : FileDisplayerInterface
Parameters
- $handle : string
Return values
FileDisplayerInterface —getClassByHandle()
Get a displayer class by handle
public
getClassByHandle(string $handle) : string
Parameters
- $handle : string
Tags
Return values
string —getDefaults()
Get default displayers, indexed by kind
public
getDefaults() : array<string|int, string>
Return values
array<string|int, string> —getForKind()
Get displayers for an asset kind
public
getForKind(string $kind) : array<string|int, FileDisplayerInterface>
Parameters
- $kind : string
Return values
array<string|int, FileDisplayerInterface> —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> —blockCacheService()
Get the block cache service
protected
blockCacheService() : BlockCacheService
Return values
BlockCacheService —blockProviderService()
Get the block providers service
protected
blockProviderService() : BlockProvidersService
Return values
BlockProvidersService —blocksService()
Get the blocks service
protected
blocksService() : BlockService
Return values
BlockService —displayService()
Get the display service
protected
displayService() : DisplayService
Return values
DisplayService —eagerLoadingService()
Get the eager loading service
protected
eagerLoadingService() : EagerLoadingService
Return values
EagerLoadingService —fieldDisplayersService()
Get the field displayers service
protected
fieldDisplayersService() : FieldDisplayerService
Return values
FieldDisplayerService —fieldsService()
Get the fields service
protected
fieldsService() : FieldsService
Return values
FieldsService —fileDisplayerService()
Get the file displayers service
protected
fileDisplayerService() : FileDisplayerService
Return values
FileDisplayerService —getByHandles()
Get displayers by handles
protected
getByHandles(array<string|int, mixed> $handles) : array<string|int, FileDisplayerInterface>
Parameters
- $handles : array<string|int, mixed>
Return values
array<string|int, FileDisplayerInterface> —groupsService()
Get the groups service
protected
groupsService() : GroupsService
Return values
GroupsService —isDisplayerValidForKind()
Is a displayer valid for a kind
protected
isDisplayerValidForKind(string $displayerHandle, string $kind) : bool
Parameters
- $displayerHandle : string
- $kind : string
Return values
bool —layoutService()
Get the layout service
protected
layoutService() : LayoutService
Return values
LayoutService —matrixService()
Get the matrix service
protected
matrixService() : MatrixService
Return values
MatrixService —register()
Registers displayers
protected
register() : mixed
Return values
mixed —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 —themesRegistry()
Get the themes registry
protected
themesRegistry() : ThemesRegistry
Return values
ThemesRegistry —triggerEvent()
Triggers an event
protected
triggerEvent(string $type, Event $event) : mixed
Parameters
- $type : string
- $event : Event
Return values
mixed —viewModesService()
Get the view mode service
protected
viewModesService() : ViewModeService
Return values
ViewModeService —viewService()
Get the view service
protected
viewService() : ViewService