TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
InlineControlContainer Class Reference
Inheritance diagram for InlineControlContainer:
AbstractContainer AbstractNode NodeInterface

Public Member Functions

 __construct (NodeFactory $nodeFactory, array $data)
 
- Public Member Functions inherited from AbstractContainer
 __construct (NodeFactory $nodeFactory, array $data)
 
- Public Member Functions inherited from AbstractNode
 __construct (NodeFactory $nodeFactory, array $data)
 
 render ()
 

Protected Member Functions

 getLevelInteractionLink ($type, $objectPrefix, $conf=[])
 
 wrapWithAnchor ($text, $link, $attributes=[])
 
 renderPossibleRecordsSelectorTypeGroupDB (array $inlineConfiguration)
 
 renderPossibleRecordsSelectorTypeSelect (array $config, array $uniqueIds)
 
 extractFlexFormParts ($formElementName)
 
 getBackendUserAuthentication ()
 
 getLanguageService ()
 
- Protected Member Functions inherited from AbstractContainer
 explodeSingleFieldShowItemConfiguration ($field)
 
 renderTabMenu (array $menuItems, $domId, $defaultTabIndex=1)
 
 previewFieldValue ($value, $config, $field= '')
 
- Protected Member Functions inherited from AbstractNode
 initializeResultArray ()
 
 mergeChildReturnIntoExistingResult (array $existing, array $childReturn)
 
 getValidationDataAsDataAttribute (array $config)
 
 getValidationDataAsJsonString (array $config)
 

Protected Attributes

 $inlineData = []
 
 $inlineStackProcessor
 
 $iconFactory
 
 $requireJsModules = []
 
- Protected Attributes inherited from AbstractContainer
 $nodeFactory
 
- Protected Attributes inherited from AbstractNode
 $data = []
 

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 40 of file InlineControlContainer.php.

Constructor & Destructor Documentation

__construct ( NodeFactory  $nodeFactory,
array  $data 
)

Container objects give $nodeFactory down to other containers.

Parameters
NodeFactory$nodeFactory
array$data

Implements NodeInterface.

Definition at line 70 of file InlineControlContainer.php.

References GeneralUtility\makeInstance().

Member Function Documentation

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$formElementNameThe form element name
Returns
array|NULL

Definition at line 608 of file InlineControlContainer.php.

References GeneralUtility\trimExplode().

getBackendUserAuthentication ( )
protected
Returns
BackendUserAuthentication

Definition at line 624 of file InlineControlContainer.php.

Referenced by InlineControlContainer\renderPossibleRecordsSelectorTypeGroupDB().

getLevelInteractionLink (   $type,
  $objectPrefix,
  $conf = [] 
)
protected

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

Parameters
string$typeThe link type, values are 'newRecord', 'localize' and 'synchronize'.
string$objectPrefixThe "path" to the child record to create (e.g. 'data-parentPageId-partenTable-parentUid-parentField-childTable]')
array$confTCA configuration of the parent(!) field
Returns
string The HTML code of the new link, wrapped in a div

Definition at line 348 of file InlineControlContainer.php.

References InlineControlContainer\getLanguageService(), GeneralUtility\quoteJSvalue(), Icon\SIZE_SMALL, and InlineControlContainer\wrapWithAnchor().

renderPossibleRecordsSelectorTypeGroupDB ( array  $inlineConfiguration)
protected

Generate a link 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$inlineConfigurationTCA inline configuration of the parent(!) field
Returns
string A HTML link that opens an element browser in a new window

Definition at line 423 of file InlineControlContainer.php.

References InlineControlContainer\getBackendUserAuthentication(), OnlineMediaHelperRegistry\getInstance(), InlineControlContainer\getLanguageService(), GeneralUtility\getMaxUploadFileSize(), Folder\getStorage(), GeneralUtility\quoteJSvalue(), Icon\SIZE_SMALL, and GeneralUtility\trimExplode().

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$configTCA inline configuration of the parent(!) field
array$uniqueIdsThe uids that have already been used and should be unique
Returns
string A HTML <select> box with all possible records

Definition at line 553 of file InlineControlContainer.php.

References MathUtility\forceIntegerInRange(), InlineControlContainer\getLanguageService(), GeneralUtility\quoteJSvalue(), and Icon\SIZE_SMALL.

wrapWithAnchor (   $text,
  $link,
  $attributes = [] 
)
protected

Wraps a text with an anchor and returns the HTML representation.

Parameters
string$textThe text to be wrapped by an anchor
string$linkThe link to be used in the anchor
array$attributesArray of attributes to be used in the anchor
Returns
string The wrapped text as HTML representation

Definition at line 405 of file InlineControlContainer.php.

Referenced by InlineControlContainer\getLevelInteractionLink().

Member Data Documentation

$iconFactory
protected

Definition at line 57 of file InlineControlContainer.php.

$inlineData = []
protected

Definition at line 47 of file InlineControlContainer.php.

$inlineStackProcessor
protected

Definition at line 52 of file InlineControlContainer.php.

$requireJsModules = []
protected

Definition at line 62 of file InlineControlContainer.php.