FieldDisplayerService
extends Service
in package
Table of Contents
- EVENT_DEFAULT_DISPLAYER = 'default_displayer'
- EVENT_FIELD_TARGETS = 'field_targets'
- EVENT_REGISTER_DISPLAYERS = 'register_displayers'
- $_defaults : array<string|int, mixed>
- Defaults displayers, indexed by field class
- $_displayers : array<string|int, string>
- All displayers classes, indexed by handle
- $_fieldTargets : array<string|int, mixed>
- Field targets, indexed by displayer handle
- ensureDisplayerIsValidForField() : mixed
- Ensure a displayer handle is valid for a field class
- getAll() : array<string|int, string>
- Displayers getter
- getAvailable() : array<string|int, FieldDisplayerInterface>
- Get available displayers for a field
- getByHandle() : FieldDisplayerInterface
- Get a displayer by handle
- getClassByHandle() : string
- Get a displayer class by handle
- getDefaultHandle() : string|null
- Get the default displayer handle for a field class
- getFieldTargets() : array<string|int, string>
- Get the field targets for a displayer handle
- hasDisplayer() : bool
- Does a displayer handle exists
- 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
- ensureDisplayerIsDefined() : mixed
- Ensures a displayer handle is defined
- fieldDisplayersService() : FieldDisplayerService
- Get the field displayers service
- fieldsService() : FieldsService
- Get the fields service
- fileDisplayerService() : FileDisplayerService
- Get the file displayers service
- getByHandles() : array<string|int, FieldDisplayerInterface>
- Get many displayers, by handle
- groupsService() : GroupsService
- Get the groups service
- layoutService() : LayoutService
- Get the layout service
- matrixService() : MatrixService
- Get the matrix service
- register() : mixed
- Registers field displayers
- registerDefault() : mixed
- Register default displayer handle for a field class
- registerTargets() : mixed
- Register field targets for a displayer handle
- 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_DISPLAYER
public
mixed
EVENT_DEFAULT_DISPLAYER
= 'default_displayer'
EVENT_FIELD_TARGETS
public
mixed
EVENT_FIELD_TARGETS
= 'field_targets'
EVENT_REGISTER_DISPLAYERS
public
mixed
EVENT_REGISTER_DISPLAYERS
= 'register_displayers'
Properties
$_defaults
Defaults displayers, indexed by field class
protected
array<string|int, mixed>
$_defaults
= []
$_displayers
All displayers classes, indexed by handle
protected
array<string|int, string>
$_displayers
$_fieldTargets
Field targets, indexed by displayer handle
protected
array<string|int, mixed>
$_fieldTargets
= []
Methods
ensureDisplayerIsValidForField()
Ensure a displayer handle is valid for a field class
public
ensureDisplayerIsValidForField(string $displayerHandle, string $fieldClass) : mixed
Parameters
- $displayerHandle : string
- $fieldClass : string
Tags
Return values
mixed —getAll()
Displayers getter
public
getAll() : array<string|int, string>
Return values
array<string|int, string> —getAvailable()
Get available displayers for a field
public
getAvailable(FieldInterface $field) : array<string|int, FieldDisplayerInterface>
Parameters
- $field : FieldInterface
Return values
array<string|int, FieldDisplayerInterface> —getByHandle()
Get a displayer by handle
public
getByHandle(string $handle) : FieldDisplayerInterface
Parameters
- $handle : string
Tags
Return values
FieldDisplayerInterface —getClassByHandle()
Get a displayer class by handle
public
getClassByHandle(string $handle) : string
Parameters
- $handle : string
Tags
Return values
string —getDefaultHandle()
Get the default displayer handle for a field class
public
getDefaultHandle(string $classFor) : string|null
Parameters
- $classFor : string
Return values
string|null —getFieldTargets()
Get the field targets for a displayer handle
public
getFieldTargets(string $displayerHandle) : array<string|int, string>
Parameters
- $displayerHandle : string
Return values
array<string|int, string> —hasDisplayer()
Does a displayer handle exists
public
hasDisplayer(string $handle) : bool
Parameters
- $handle : string
Return values
bool —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 —ensureDisplayerIsDefined()
Ensures a displayer handle is defined
protected
ensureDisplayerIsDefined(string $handle) : mixed
Parameters
- $handle : string
Tags
Return values
mixed —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 many displayers, by handle
protected
getByHandles(array<string|int, mixed> $handles) : array<string|int, FieldDisplayerInterface>
Parameters
- $handles : array<string|int, mixed>
Return values
array<string|int, FieldDisplayerInterface> —groupsService()
Get the groups service
protected
groupsService() : GroupsService
Return values
GroupsService —layoutService()
Get the layout service
protected
layoutService() : LayoutService
Return values
LayoutService —matrixService()
Get the matrix service
protected
matrixService() : MatrixService
Return values
MatrixService —register()
Registers field displayers
protected
register() : mixed
Return values
mixed —registerDefault()
Register default displayer handle for a field class
protected
registerDefault(string $fieldClass) : mixed
Parameters
- $fieldClass : string
Return values
mixed —registerTargets()
Register field targets for a displayer handle
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