InlineControlContainer

class \TYPO3\CMS\Backend\Form\Container\InlineControlContainer

Extends
AbstractContainer

Inline element entry container.

This container is the entry step to rendering an inline element. It is created by SingleFieldContainer.

The code creates the main structure for the single inline elements, initializes the inlineData array, that is manipulated and also returned back in its manipulated state. The "control" stuff of inline elements is rendered here, for example the "create new" button.

For each existing inline relation an InlineRecordContainer is called for further processing.

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
Default field information enabled for this element.
$defaultFieldWizard  : array
$iconFactory  : IconFactory
$inlineData  : array
Inline data array used in JS, returned as JSON object to frontend
$inlineStackProcessor  : InlineStackProcessor
$javaScriptModules  : array<int, JavaScriptModuleInstruction>
$nodeFactory  : NodeFactory
Instance of the node factory to create sub elements, container and single element expansions.

Methods

__construct()  : mixed
Container objects give $nodeFactory down to other containers.
render()  : array
Entry method
explodeSingleFieldShowItemConfiguration()  : array
A single field of TCA 'types' 'showitem' can have three semicolon separated configuration options: fieldName: Name of the field to be found in TCA 'columns' section fieldLabel: An alternative field label paletteName: Name of a palette to be found in TCA 'palettes' section that is rendered after this field
extractFlexFormParts()  : array|null
Extracts FlexForm parts of a form element name like data[table][uid][field][sDEF][lDEF][FlexForm][vDEF] Helper method used in inline
getBackendUserAuthentication()  : BackendUserAuthentication
getLanguageService()  : LanguageService
getLevelInteractionButton()  : string
Creates the HTML code of a general button to be used on a level of inline children.
getValidationDataAsJsonString()  : string
Build JSON string for validations rules.
initializeResultArray()  : array
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.
renderFieldControl()  : array
Merge field control configuration with default controls and render them.
renderFieldInformation()  : array
Merge field information configuration with default and render them.
renderFieldWizard()  : array
Merge field wizard configuration with default wizards and render them.
renderPossibleRecordsSelectorTypeGroupDB()  : string
Generate a button that opens an element browser in a new window.
renderPossibleRecordsSelectorTypeSelect()  : string
Get a selector as used for the select type, to select from all available records and to create a relation to the embedding record (e.g. like MM).
renderTabMenu()  : string
Render tabs with label and content. Used by TabsContainer and FlexFormTabsContainer.
wrapWithButton()  : string
Wraps a text with a button and returns the HTML representation.

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

Default field information enabled for this element.

protected array $defaultFieldInformation = ['tcaDescription' => ['renderType' => 'tcaDescription']]

$defaultFieldWizard

protected array $defaultFieldWizard = ['localizationStateSelector' => ['renderType' => 'localizationStateSelector']]

Default wizards

$inlineData

Inline data array used in JS, returned as JSON object to frontend

protected array $inlineData = []

$nodeFactory

Instance of the node factory to create sub elements, container and single element expansions.

Deprecated

since TYPO3 v12.4. will be removed in TYPO3 v13.0.

protected NodeFactory $nodeFactory

Methods

__construct()

Container objects give $nodeFactory down to other containers.

public __construct(NodeFactory $nodeFactory, array $data) : mixed

Parameters

$nodeFactory : NodeFactory
$data : array

render()

Entry method

public render() : array

Return values

array —

As defined in initializeResultArray() of AbstractNode

explodeSingleFieldShowItemConfiguration()

A single field of TCA 'types' 'showitem' can have three semicolon separated configuration options: fieldName: Name of the field to be found in TCA 'columns' section fieldLabel: An alternative field label paletteName: Name of a palette to be found in TCA 'palettes' section that is rendered after this field

protected explodeSingleFieldShowItemConfiguration(string $field) : array

Parameters

$field : string

Semicolon separated field configuration

Tags

throws
RuntimeException

Return values

array

extractFlexFormParts()

Extracts FlexForm parts of a form element name like data[table][uid][field][sDEF][lDEF][FlexForm][vDEF] Helper method used in inline

protected extractFlexFormParts(string $formElementName) : array|null

Parameters

$formElementName : string

The form element name

Return values

array|null

getLevelInteractionButton()

Creates the HTML code of a general button to be used on a level of inline children.

protected getLevelInteractionButton(string $type[, array $conf = [] ]) : string

The possible keys for the parameter $type are 'newRecord', 'localize' and 'synchronize'.

Parameters

$type : string

The button type, values are 'newRecord', 'localize' and 'synchronize'.

$conf : array = []

TCA configuration of the parent(!) field

Return values

string —

The HTML code of the new button, wrapped in a div

getValidationDataAsJsonString()

Build JSON string for validations rules.

protected getValidationDataAsJsonString(array $config) : string

Parameters

$config : array

Return values

string

initializeResultArray()

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

Return values

array

mergeChildReturnIntoExistingResult()

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

renderFieldControl()

Merge field control configuration with default controls and render them.

protected renderFieldControl() : array

Return values

array —

Result array

renderFieldInformation()

Merge field information configuration with default and render them.

protected renderFieldInformation() : array

Return values

array —

Result array

renderFieldWizard()

Merge field wizard configuration with default wizards and render them.

protected renderFieldWizard() : array

Return values

array —

Result array

renderPossibleRecordsSelectorTypeGroupDB()

Generate a button that opens an element browser in a new window.

protected renderPossibleRecordsSelectorTypeGroupDB(array $inlineConfiguration) : string

For group/db there is no way to use a "selector" like a -box.

Parameters

$inlineConfiguration : array

TCA inline configuration of the parent(!) field

Return values

string —

A HTML button that opens an element browser in a new window

renderPossibleRecordsSelectorTypeSelect()

Get a selector as used for the select type, to select from all available records and to create a relation to the embedding record (e.g. like MM).

protected renderPossibleRecordsSelectorTypeSelect(array $config, array $uniqueIds) : string

Parameters

$config : array

TCA inline configuration of the parent(!) field

$uniqueIds : array

The uids that have already been used and should be unique

Return values

string —

A HTML