EditPopup
class \
- Extends
- AbstractNode
- Uses
- OnFieldChangeTrait
Renders the icon with link parameters to edit a selected element, typically used for single elements of type=group or type=select.
Table of Contents
Properties
- $data : array
- Main data array to work on, given from parent to child elements
- $defaultFieldControl : array
- A list of default field controls added to the element / container.
- $defaultFieldInformation : array
- A list of default field information added to the element / container.
- $defaultFieldWizard : array
- A list of default field wizards added to the element / container.
Methods
- __construct() : mixed
- render() : array
- Edit popup control
- setData() : void
- Retrieve the current data array from NodeFactory.
-
forwardOnFieldChangeQueryParams()
: array{fieldChangeFunc: array
, fieldChangeFuncHash: string} - Forwards URL query params for `LinkBrowserController`
- getOnFieldChangeAttrs() : array<string, string>
- getOnFieldChangeItems() : array<int, array>
- getValidationDataAsJsonString() : string
- Build JSON string for validations rules.
-
initializeResultArray()
: array{additionalInlineLanguageLabelFiles: list
, stylesheetFiles: list , javaScriptModules: list , inlineData: array , html: string} - Initialize the array that is returned to parent after calling. This structure is identical for *all* nodes. Parent will merge the return of a child with its own stuff and in itself return an array of the same structure.
- mergeChildReturnIntoExistingResult() : array
- Merge existing data with a child return array.
Properties
$data
Main data array to work on, given from parent to child elements
protected
array
$data
= []
$defaultFieldControl
A list of default field controls added to the element / container.
protected
array
$defaultFieldControl
= []
This property is often reset by single elements.
$defaultFieldInformation
A list of default field information added to the element / container.
protected
array
$defaultFieldInformation
= []
$defaultFieldWizard
A list of default field wizards added to the element / container.
protected
array
$defaultFieldWizard
= []
This property is often reset by single elements.
Methods
__construct()
public
__construct(UriBuilder $uriBuilder, HashService $hashService) : mixed
Parameters
- $uriBuilder : UriBuilder
- $hashService : HashService
render()
Edit popup control
public
render() : array
Return values
array —As defined by FieldControl class
setData()
Retrieve the current data array from NodeFactory.
public
setData(array $data) : void
Parameters
- $data : array
forwardOnFieldChangeQueryParams()
Forwards URL query params for `LinkBrowserController`
protected
forwardOnFieldChangeQueryParams(array<int, OnFieldChangeInterface> $items) : array{fieldChangeFunc: array, fieldChangeFuncHash: string}
Parameters
- $items : array<int, OnFieldChangeInterface>
-
fieldChangeFuncitems
Return values
array{fieldChangeFunc: arrayrelevant URL query params for LinkBrowserController
getOnFieldChangeAttrs()
protected
getOnFieldChangeAttrs(string $event, array<int, OnFieldChangeInterface> $items) : array<string, string>
Parameters
- $event : string
-
target client event, either
changeorclick - $items : array<int, OnFieldChangeInterface>
-
fieldChangeFuncitems
Return values
array<string, string> —HTML attrs, not encoded - consumers MUST encode with htmlspecialchars
getOnFieldChangeItems()
protected
getOnFieldChangeItems(OnFieldChangeInterface[] $items) : array<int, array>
Parameters
- $items : OnFieldChangeInterface[]
-
fieldChangeFuncitems
Return values
array<int, array>getValidationDataAsJsonString()
Build JSON string for validations rules.
protected
getValidationDataAsJsonString(array $config) : string
Parameters
- $config : array
Return values
stringinitializeResultArray()
Initialize the array that is returned to parent after calling. This structure is identical for *all* nodes. Parent will merge the return of a child with its own stuff and in itself return an array of the same structure.
protected
initializeResultArray() : array{additionalInlineLanguageLabelFiles: list, stylesheetFiles: list, javaScriptModules: list, inlineData: array, html: string}
Return values
array{additionalInlineLanguageLabelFiles: listmergeChildReturnIntoExistingResult()
Merge existing data with a child return array.
protected
mergeChildReturnIntoExistingResult(array $existing, array $childReturn[, bool $mergeHtml = true ]) : array
The incoming $childReturn array should be initialized using initializeResultArray() beforehand.
Parameters
- $existing : array
-
Currently merged array
- $childReturn : array
-
Array returned by child
- $mergeHtml : bool = true
-
If false, the ['html'] section of $childReturn will NOT be added to $existing
Return values
array —Result array