OnFieldChangeTrait
Table of Contents
Methods
-
forwardOnFieldChangeQueryParams()
: array{fieldChangeFunc: array
, fieldChangeFuncHash: string} - Forwards URL query params for `LinkBrowserController`
- getOnFieldChangeAttrs() : array<string, string>
- getOnFieldChangeItems() : array<int, array<string|int, mixed>>
- validateOnFieldChange() : bool
Methods
forwardOnFieldChangeQueryParams()
Forwards URL query params for `LinkBrowserController`
protected
forwardOnFieldChangeQueryParams(array<string, string|OnFieldChangeInterface> $items) : array{fieldChangeFunc: array, fieldChangeFuncHash: string}
Parameters
- $items : array<string, string|OnFieldChangeInterface>
-
fieldChangeFunc
items
Return values
array{fieldChangeFunc: arrayrelevant URL query params for LinkBrowserController
getOnFieldChangeAttrs()
protected
getOnFieldChangeAttrs(string $event, array<string, string|OnFieldChangeInterface> $items) : array<string, string>
Parameters
- $event : string
-
target client event, either
change
orclick
- $items : array<string, string|OnFieldChangeInterface>
-
fieldChangeFunc
items
Return values
array<string, string> —HTML attrs, not encoded - consumers MUST encode with htmlspecialchars
getOnFieldChangeItems()
protected
getOnFieldChangeItems(array<string, string|OnFieldChangeInterface> $items) : array<int, array<string|int, mixed>>
Parameters
- $items : array<string, string|OnFieldChangeInterface>
-
fieldChangeFunc
items
Return values
array<int, array<string|int, mixed>>validateOnFieldChange()
protected
validateOnFieldChange(array<string, string|OnFieldChangeInterface> $items[, bool $deprecate = true ]) : bool
Parameters
- $items : array<string, string|OnFieldChangeInterface>
-
fieldChangeFunc
items - $deprecate : bool = true
-
whether to trigger deprecations
Return values
bool —whether all items implement OnFieldChangeInterface