Craft Activity (2.x)

BlockFields extends DefaultHandler
in package
Uses ProjectConfigFields

Tags
since
2.2.0

Table of Contents

EVENT_REGISTER_TARGETS  = 'register-targets'
$data  : mixed
$fancyValue  : mixed
$value  : mixed
$_dirty  : array<string|int, mixed>
getConfigValues()  : array<string|int, mixed>
Get config values for a path
getDbValue()  : array<string|int, mixed>
getDirty()  : array<string|int, mixed>
getDirtyConfig()  : array<string|int, mixed>
Calculate dirty config, $newSettigns and $oldSettings are arrays of field handlers
getTargets()  : array<string|int, mixed>
Get the targets this field handler applies to, can be modified through an event
getTemplate()  : string|null
hasFancyValue()  : bool
Does this handler defines a fancy value
isDirty()  : bool
_getTargets()  : array<string|int, mixed>
buildDirty()  : array<string|int, mixed>
Build dirty values
getHandler()  : FieldHandler
Get the handler for a path and a value
getPathFieldHandler()  : string
getTrackedFieldNames()  : mixed
getTrackedFieldTypings()  : array<string|int, mixed>
typeValue()  : mixed
Type a value by path

Constants

EVENT_REGISTER_TARGETS

public mixed EVENT_REGISTER_TARGETS = 'register-targets'

Properties

Methods

getConfigValues()

Get config values for a path

public getConfigValues(string $basePath, array<string|int, mixed> $config) : array<string|int, mixed>
Parameters
$basePath : string
$config : array<string|int, mixed>
Return values
array<string|int, mixed>

getDbValue()

public getDbValue(string $valueKey) : array<string|int, mixed>
Parameters
$valueKey : string
Tags
inheritDoc
Return values
array<string|int, mixed>

getDirtyConfig()

Calculate dirty config, $newSettigns and $oldSettings are arrays of field handlers

public getDirtyConfig(string $basePath, array<string|int, mixed> $newSettings, array<string|int, mixed> $oldSettings) : array<string|int, mixed>
Parameters
$basePath : string
$newSettings : array<string|int, mixed>
$oldSettings : array<string|int, mixed>
Return values
array<string|int, mixed>

getTargets()

Get the targets this field handler applies to, can be modified through an event

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

getTemplate()

public static getTemplate() : string|null
Tags
inheritDoc
Return values
string|null

hasFancyValue()

Does this handler defines a fancy value

public hasFancyValue() : bool
Return values
bool

_getTargets()

protected static _getTargets() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

buildDirty()

Build dirty values

protected buildDirty(array<string|int, mixed> $newFields, array<string|int, mixed> $oldFields) : array<string|int, mixed>
Parameters
$newFields : array<string|int, mixed>
$oldFields : array<string|int, mixed>
Return values
array<string|int, mixed>

getHandler()

Get the handler for a path and a value

protected getHandler(string $baseName, string $path, array<string|int, mixed> $config, mixed $value) : FieldHandler
Parameters
$baseName : string
$path : string
$config : array<string|int, mixed>
$value : mixed
Return values
FieldHandler

getPathFieldHandler()

protected getPathFieldHandler(string $path, array<string|int, mixed> $config) : string
Parameters
$path : string
$config : array<string|int, mixed>
Tags
inheritDoc
Return values
string

getTrackedFieldNames()

protected getTrackedFieldNames(array<string|int, mixed> $config) : mixed
Parameters
$config : array<string|int, mixed>
Tags
inheritDoc
Return values
mixed

getTrackedFieldTypings()

protected getTrackedFieldTypings(array<string|int, mixed> $config) : array<string|int, mixed>
Parameters
$config : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

typeValue()

Type a value by path

protected typeValue(array<string|int, mixed> $config, string $path, mixed $value) : mixed
Parameters
$config : array<string|int, mixed>
$path : string
$value : mixed
Return values
mixed

Search results