FieldHandlers
extends Component
in package
Table of Contents
- EVENT_REGISTER_ELEMENT_HANDLERS = 'event-register-element-handlers'
- EVENT_REGISTER_PROJECTCONFIG_HANDLERS = 'event-register-projectconfig-handlers'
- $_elementHandlers : array<string|int, mixed>
- Element fields handlers
- $_projectConfigHandlers : array<string|int, mixed>
- Project config fields handlers
- $handlerTargets : array<string|int, mixed>
- getElementHandlers() : array<string|int, mixed>
- Get element handlers, indexed by field class
- getForElementField() : string
- Get the field handler class for an element field class
- getForProjectConfigPath() : string
- Get the field handler for a project config path
- getHandlerTargets() : array<string|int, mixed>
- Get the targets for a handler
- getProjectConfigHandlers() : array<string|int, mixed>
- Get project config field handlers, indexed by config path
- hasElementHandler() : bool
- Does a field have a field handler registered
- hasProjectConfigHandler() : bool
- Does a path have a field handler registered
- registerElementHandlers() : mixed
- Registers element field handlers
- registerProjectConfigHandlers() : mixed
- Register project config field handlers
Constants
EVENT_REGISTER_ELEMENT_HANDLERS
public
mixed
EVENT_REGISTER_ELEMENT_HANDLERS
= 'event-register-element-handlers'
EVENT_REGISTER_PROJECTCONFIG_HANDLERS
public
mixed
EVENT_REGISTER_PROJECTCONFIG_HANDLERS
= 'event-register-projectconfig-handlers'
Properties
$_elementHandlers
Element fields handlers
protected
array<string|int, mixed>
$_elementHandlers
$_projectConfigHandlers
Project config fields handlers
protected
array<string|int, mixed>
$_projectConfigHandlers
$handlerTargets
protected
array<string|int, mixed>
$handlerTargets
= []
Methods
getElementHandlers()
Get element handlers, indexed by field class
public
getElementHandlers() : array<string|int, mixed>
Return values
array<string|int, mixed> —getForElementField()
Get the field handler class for an element field class
public
getForElementField(string $fieldClass) : string
Parameters
- $fieldClass : string
Return values
string —getForProjectConfigPath()
Get the field handler for a project config path
public
getForProjectConfigPath(string $path) : string
Parameters
- $path : string
Return values
string —getHandlerTargets()
Get the targets for a handler
public
getHandlerTargets(string $class, array<string|int, mixed> $default) : array<string|int, mixed>
Parameters
- $class : string
- $default : array<string|int, mixed>
Return values
array<string|int, mixed> —getProjectConfigHandlers()
Get project config field handlers, indexed by config path
public
getProjectConfigHandlers() : array<string|int, mixed>
Return values
array<string|int, mixed> —hasElementHandler()
Does a field have a field handler registered
public
hasElementHandler(string $fieldClass) : bool
Parameters
- $fieldClass : string
Return values
bool —hasProjectConfigHandler()
Does a path have a field handler registered
public
hasProjectConfigHandler(string $path) : bool
Parameters
- $path : string
Return values
bool —registerElementHandlers()
Registers element field handlers
protected
registerElementHandlers() : mixed
Return values
mixed —registerProjectConfigHandlers()
Register project config field handlers
protected
registerProjectConfigHandlers() : mixed