‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Form\Container\InlineControlContainer Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Form\Container\InlineControlContainer:
TYPO3\CMS\Backend\Form\Container\AbstractContainer TYPO3\CMS\Backend\Form\AbstractNode TYPO3\CMS\Backend\Form\NodeInterface

Public Member Functions

 __construct (private readonly IconFactory $iconFactory, private readonly InlineStackProcessor $inlineStackProcessor, private readonly HashService $hashService,)
 
array render ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Backend\Form\Container\AbstractContainer
 injectNodeFactory (NodeFactory $nodeFactory)
 
 injectBackendViewFactory (BackendViewFactory $backendViewFactory)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Backend\Form\AbstractNode
 setData (array $data)
 

Protected Member Functions

string getLevelInteractionButton (string $type, array $conf=[])
 
string wrapWithButton (string $text, array $attributes=[])
 
string renderPossibleRecordsSelectorTypeGroupDB (array $inlineConfiguration)
 
string renderPossibleRecordsSelectorTypeSelect (array $config, array $uniqueIds)
 
array null extractFlexFormParts ($formElementName)
 
 getLanguageService ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\Form\Container\AbstractContainer
array renderFieldInformation ()
 
array renderFieldControl ()
 
array renderFieldWizard ()
 
 explodeSingleFieldShowItemConfiguration (string $field)
 
 renderTabMenu (array $menuItems, string $domId)
 
 wrapWithFieldsetAndLegend (string $fieldContent)
 
 getBackendUserAuthentication ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\Form\AbstractNode
 initializeResultArray ()
 
array mergeChildReturnIntoExistingResult (array $existing, array $childReturn, bool $mergeHtml=true)
 
 getValidationDataAsJsonString (array $config)
 

Protected Attributes

array $inlineData = array( )
 
array< int, JavaScriptModuleInstruction$javaScriptModules = array( )
 
array $defaultFieldInformation
 
array $defaultFieldWizard
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Backend\Form\Container\AbstractContainer
NodeFactory $nodeFactory
 
BackendViewFactory $backendViewFactory
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Backend\Form\AbstractNode
array $data = []
 
array $defaultFieldInformation = array( )
 
array $defaultFieldControl = array( )
 
array $defaultFieldWizard = array( )
 

Detailed Description

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.

Definition at line 39 of file InlineControlContainer.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Form\Container\InlineControlContainer::__construct ( private readonly IconFactory  $iconFactory,
private readonly InlineStackProcessor  $inlineStackProcessor,
private readonly HashService  $hashService 
)

Definition at line 69 of file InlineControlContainer.php.

Member Function Documentation

◆ extractFlexFormParts()

array null TYPO3\CMS\Backend\Form\Container\InlineControlContainer::extractFlexFormParts (   $formElementName)
protected

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

Parameters
string$formElementName‪The form element name
Returns
‪array|null

Definition at line 564 of file InlineControlContainer.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Form\Container\InlineControlContainer\render().

◆ getLanguageService()

◆ getLevelInteractionButton()

string TYPO3\CMS\Backend\Form\Container\InlineControlContainer::getLevelInteractionButton ( string  $type,
array  $conf = [] 
)
protected

Creates the HTML code of a general button to be used on a level of inline children. The possible keys for the parameter $type are 'newRecord', 'localize' and 'synchronize'.

Parameters
string$type‪The button type, values are 'newRecord', 'localize' and 'synchronize'.
array$conf‪TCA configuration of the parent(!) field
Returns
‪string The HTML code of the new button, wrapped in a div

Definition at line 387 of file InlineControlContainer.php.

References $GLOBALS, TYPO3\CMS\Backend\Form\Container\InlineControlContainer\getLanguageService(), and TYPO3\CMS\Backend\Form\Container\InlineControlContainer\wrapWithButton().

Referenced by TYPO3\CMS\Backend\Form\Container\InlineControlContainer\render().

◆ render()

◆ renderPossibleRecordsSelectorTypeGroupDB()

string TYPO3\CMS\Backend\Form\Container\InlineControlContainer::renderPossibleRecordsSelectorTypeGroupDB ( array  $inlineConfiguration)
protected

Generate a button that opens an element browser in a new window. For group/db there is no way to use a "selector" like a <select>|</select>-box.

Parameters
array$inlineConfiguration‪TCA inline configuration of the parent(!) field
Returns
‪string A HTML button that opens an element browser in a new window

Definition at line 453 of file InlineControlContainer.php.

References TYPO3\CMS\Backend\Form\Container\InlineControlContainer\getLanguageService(), and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Backend\Form\Container\InlineControlContainer\render().

◆ renderPossibleRecordsSelectorTypeSelect()

string TYPO3\CMS\Backend\Form\Container\InlineControlContainer::renderPossibleRecordsSelectorTypeSelect ( array  $config,
array  $uniqueIds 
)
protected

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

Parameters
array$config‪TCA inline configuration of the parent(!) field
array$uniqueIds‪The uids that have already been used and should be unique
Returns
‪string A HTML <select> box with all possible records

Definition at line 504 of file InlineControlContainer.php.

References TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange(), and TYPO3\CMS\Backend\Form\Container\InlineControlContainer\getLanguageService().

Referenced by TYPO3\CMS\Backend\Form\Container\InlineControlContainer\render().

◆ wrapWithButton()

string TYPO3\CMS\Backend\Form\Container\InlineControlContainer::wrapWithButton ( string  $text,
array  $attributes = [] 
)
protected

Wraps a text with a button and returns the HTML representation.

Parameters
string$text‪The text to be wrapped by a button
array<string,string>‪$attributes Array of attributes to be used in the anchor
Returns
‪string The wrapped text as HTML representation

Definition at line 441 of file InlineControlContainer.php.

Referenced by TYPO3\CMS\Backend\Form\Container\InlineControlContainer\getLevelInteractionButton().

Member Data Documentation

◆ $defaultFieldInformation

array TYPO3\CMS\Backend\Form\Container\InlineControlContainer::$defaultFieldInformation
protected
Initial value:
= array(
'tcaDescription' => [
'renderType' => 'tcaDescription',
],
)

Default field information enabled for this element.

Definition at line 55 of file InlineControlContainer.php.

◆ $defaultFieldWizard

array TYPO3\CMS\Backend\Form\Container\InlineControlContainer::$defaultFieldWizard
protected
Initial value:
= array(
'localizationStateSelector' => [
'renderType' => 'localizationStateSelector',
],
)

Default wizards

Definition at line 63 of file InlineControlContainer.php.

◆ $inlineData

array TYPO3\CMS\Backend\Form\Container\InlineControlContainer::$inlineData = array( )
protected

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

Definition at line 45 of file InlineControlContainer.php.

Referenced by TYPO3\CMS\Backend\Form\Container\InlineControlContainer\render().

◆ $javaScriptModules

array<int,JavaScriptModuleInstruction> TYPO3\CMS\Backend\Form\Container\InlineControlContainer::$javaScriptModules = array( )
protected

Definition at line 49 of file InlineControlContainer.php.