TcaInlineConfiguration implements FormDataProviderInterface
Set or initialize configuration for inline fields in TCA
Table of Contents
Interfaces
- FormDataProviderInterface
- Interface must be implemented by form data provider classes.
Methods
- addData() : array<string|int, mixed>
- Find all inline fields and force proper configuration
- addInlineSelectorAndUniqueConfiguration() : array<string|int, mixed>
- If foreign_selector or foreign_unique is set, this points to a field configuration of the child table. The InlineControlContainer may render a drop down field or an element browser later from this.
- initializeAppearance() : array<string|int, mixed>
- Set appearance configuration
- initializeChildrenLanguage() : array<string|int, mixed>
- Set default value for child records 'sys_language_uid' field. This is relevant if a localized parent is edited and a child is added via the ajax call. The child should then have the same sys_language_uid as the parent.
- initializeMinMaxItems() : array<string|int, mixed>
- Set and validate minitems and maxitems in config
Methods
addData()
Find all inline fields and force proper configuration
public
addData(array<string|int, mixed> $result) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
-
Initialized result array
Tags
Return values
array<string|int, mixed>addInlineSelectorAndUniqueConfiguration()
If foreign_selector or foreign_unique is set, this points to a field configuration of the child table. The InlineControlContainer may render a drop down field or an element browser later from this.
protected
addInlineSelectorAndUniqueConfiguration(array<string|int, mixed> $result, string $fieldName) : array<string|int, mixed>
Fetch configuration from child table configuration, sanitize and merge with overrideChildTca of foreign_selector if given that allows overriding this field definition again.
Final configuration is written to selectorOrUniqueConfiguration of inline config section.
Parameters
- $result : array<string|int, mixed>
-
Result array
- $fieldName : string
-
Current handle field name
Tags
Return values
array<string|int, mixed> —Modified item array
initializeAppearance()
Set appearance configuration
protected
initializeAppearance(array<string|int, mixed> $result, string $fieldName) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
-
Result array
- $fieldName : string
-
Current handle field name
Return values
array<string|int, mixed> —Modified item array
initializeChildrenLanguage()
Set default value for child records 'sys_language_uid' field. This is relevant if a localized parent is edited and a child is added via the ajax call. The child should then have the same sys_language_uid as the parent.
protected
initializeChildrenLanguage(array<string|int, mixed> $result, string $fieldName) : array<string|int, mixed>
The method verifies if the parent is a localized parent, and writes the current languageField value into TCA ['config']['inline']['parentSysLanguageUid'] of the parent inline TCA field. The whole ['config'] section is transferred to the 'create new child' ajax controller, the value is then used within 'DatabaseRowInitializeNew' data provider to initialize the child languageField value with that value.
Parameters
- $result : array<string|int, mixed>
-
Result array
- $fieldName : string
-
Current handle field name
Return values
array<string|int, mixed> —Modified item array
initializeMinMaxItems()
Set and validate minitems and maxitems in config
protected
initializeMinMaxItems(array<string|int, mixed> $result, string $fieldName) : array<string|int, mixed>
Parameters
- $result : array<string|int, mixed>
-
Result array
- $fieldName : string
-
Current handle field name
Return values
array<string|int, mixed> —Modified item array