Craft Activity (2.x)

ProjectConfigFields

Table of Contents

getConfigValues()  : array<string|int, mixed>
Get config values for a path
getDirtyConfig()  : array<string|int, mixed>
Calculate dirty config, $newSettigns and $oldSettings are arrays of field handlers
getHandler()  : FieldHandler
Get the handler for a path and a value
getPathFieldHandler()  : string
Get the field handler for a path
getTrackedFieldNames()  : array<string|int, mixed>|string
Get tracked config names, return '*' for all
getTrackedFieldTypings()  : array<string|int, mixed>
Get fields typing, must return an array :
typeValue()  : mixed
Type a value by path

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>

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>

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()

Get the field handler for a path

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

getTrackedFieldNames()

Get tracked config names, return '*' for all

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

getTrackedFieldTypings()

Get fields typing, must return an array :

protected getTrackedFieldTypings(array<string|int, mixed> $config) : array<string|int, mixed>

[ 'field.path' => 'bool' ]

Valid typings are 'string', 'int', 'float' and 'bool'

Parameters
$config : array<string|int, mixed>
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