InlineRecordContainer

class \TYPO3\CMS\Backend\Form\Container\InlineRecordContainer

Extends
AbstractContainer

Render a single inline record relation.

This container is called by InlineControlContainer to render single existing records. Furthermore it is called by FormEngine for an incoming ajax request to expand an existing record or to create a new one.

This container creates the outer HTML of single inline records - eg. drag and drop and delete buttons. For rendering of the record itself processing is handed over to FullRecordContainer.

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.
$eventDispatcher  : EventDispatcherInterface
$iconFactory  : IconFactory
$inlineData  : array
Inline data array used for JSON output
$inlineStackProcessor  : InlineStackProcessor
$nodeFactory  : NodeFactory
Instance of the node factory to create sub elements, container and single element expansions.

Methods

__construct()  : mixed
Default constructor
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
getBackendUserAuthentication()  : BackendUserAuthentication
getLanguageService()  : LanguageService
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.
renderChild()  : array
Render inner child
renderCombinationChild()  : array
Render child child
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.
renderForeignRecordHeader()  : string
Renders the HTML header for a foreign record, such as the title, toggle-function, drag'n'drop, etc.
renderForeignRecordHeaderControl()  : string
Render the control-icons for a record header (create new, sorting, delete, disable/enable).
renderTabMenu()  : string
Render tabs with label and content. Used by TabsContainer and FlexFormTabsContainer.

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.

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$inlineData

Inline data array used for JSON output

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()

Default constructor

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

Parameters

$nodeFactory : NodeFactory
$data : array

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

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

renderChild()

Render inner child

protected renderChild(array $data) : array

Parameters

$data : array

Return values

array —

Result array

renderCombinationChild()

Render child child

protected renderCombinationChild(array $data, string $appendFormFieldNames) : array

Render a table with FormEngine, that occurs on an intermediate table but should be editable directly, so two tables are combined (the intermediate table with attributes and the sub-embedded table). -> This is a direct embedding over two levels!

Parameters

$data : array
$appendFormFieldNames : string

The [

][] of the parent record (the intermediate table)

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

renderForeignRecordHeader()

Renders the HTML header for a foreign record, such as the title, toggle-function, drag'n'drop, etc.

protected renderForeignRecordHeader(array $data, string $ariaAttributesString) : string

Later on the command-icons are inserted here.

Parameters

$data : array

Current data

$ariaAttributesString : string

HTML aria attributes for the collapse button

Return values

string —

The HTML code of the header

renderForeignRecordHeaderControl()

Render the control-icons for a record header (create new, sorting, delete, disable/enable).

protected renderForeignRecordHeaderControl(array $data) : string

Most of the parts are copy&paste from TYPO3\CMS\Backend\RecordList\DatabaseRecordList and modified for the JavaScript calls here

Parameters

$data : array

Current data

Return values

string —

The HTML code with the control-icons

renderTabMenu()

Render tabs with label and content. Used by TabsContainer and FlexFormTabsContainer.

protected renderTabMenu(array $menuItems, string $domId[, int $defaultTabIndex = 1 ]) : string

Re-uses the template Tabs.html which is also used by ModuleTemplate.php.

Parameters

$menuItems : array

Tab elements, each element is an array with "label" and "content"

$domId : string

DOM id attribute, will be appended with an iteration number per tab.

$defaultTabIndex : int = 1

Return values

string
On this page