TcaInlineConfiguration

class \TYPO3\CMS\Backend\Form\FormDataProvider\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
Find all inline fields and force proper configuration
addInlineSelectorAndUniqueConfiguration()  : array
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
Set appearance configuration
initializeChildrenLanguage()  : array
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
Set and validate minitems and maxitems in config

Methods

addData()

Find all inline fields and force proper configuration

public addData(array $result) : array

Parameters

$result : array

Initialized result array

Tags

throws
UnexpectedValueException

If inline configuration is broken

Return values

array

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 $result, string $fieldName) : array

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

Result array

$fieldName : string

Current handle field name

Tags

throws
UnexpectedValueException

If configuration is broken

Return values

array —

Modified item array

initializeAppearance()

Set appearance configuration

protected initializeAppearance(array $result, string $fieldName) : array

Parameters

$result : array

Result array

$fieldName : string

Current handle field name

Return values

array —

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 $result, string $fieldName) : array

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

Result array

$fieldName : string

Current handle field name

Return values

array —

Modified item array

initializeMinMaxItems()

Set and validate minitems and maxitems in config

protected initializeMinMaxItems(array $result, string $fieldName) : array

Parameters

$result : array

Result array

$fieldName : string

Current handle field name

Return values

array —

Modified item array

On this page