TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
AbstractNode Class Reference
Inheritance diagram for AbstractNode:
NodeInterface AbstractContainer AbstractFormElement FlexFormContainerContainer FlexFormElementContainer FlexFormEntryContainer FlexFormNoTabsContainer FlexFormSectionContainer FlexFormTabsContainer FullRecordContainer InlineControlContainer InlineRecordContainer ListOfFieldsContainer NoTabsContainer OuterWrapContainer PaletteAndSingleContainer SingleFieldContainer SoloFieldContainer TabsContainer CheckboxElement GroupElement ImageManipulationElement InputColorPickerElement InputHiddenElement InputTextElement NoneElement RadioElement SelectCheckBoxElement SelectMultipleSideBySideElement SelectSingleBoxElement SelectSingleElement SelectTreeElement TextElement UnknownElement UserElement BackendLayoutWizardElement RsaInputElement RichTextElement RichTextElement T3editorElement

Public Member Functions

 __construct (NodeFactory $nodeFactory, array $data)
 
 render ()
 

Protected Member Functions

 initializeResultArray ()
 
 mergeChildReturnIntoExistingResult (array $existing, array $childReturn)
 
 getValidationDataAsDataAttribute (array $config)
 
 getValidationDataAsJsonString (array $config)
 

Protected Attributes

 $data = []
 

Detailed Description

Base class for container and single elements - their abstracts extend from here.

Definition at line 23 of file backend/Classes/Form/AbstractNode.php.

Constructor & Destructor Documentation

__construct ( NodeFactory  $nodeFactory,
array  $data 
)

Set data to data array.

Todo:

: Should NOT set the nodeFactory instance, this is done by AbstractContainer only,

: but not done for Element classes: Elements are tree leaves, they MUST

: not create new nodes again.

: Currently, AbstractFormElement still does that, but do not rely on the fact that

: Element classes have an instance of NodeFactory at hand.

Parameters
NodeFactory$nodeFactory
array$data

Implements NodeInterface.

Definition at line 44 of file backend/Classes/Form/AbstractNode.php.

References AbstractNode\$data.

Member Function Documentation

getValidationDataAsDataAttribute ( array  $config)
protected

Build JSON string for validations rules and return it as data attribute for HTML elements.

Parameters
array$config
Returns
string

Definition at line 132 of file backend/Classes/Form/AbstractNode.php.

References AbstractNode\getValidationDataAsJsonString().

Referenced by RichTextElement\getHtml(), SelectMultipleSideBySideElement\render(), SelectTreeElement\render(), and SelectSingleBoxElement\renderSelectElement().

getValidationDataAsJsonString ( array  $config)
protected

Build JSON string for validations rules.

Parameters
array$config
Returns
string

Definition at line 143 of file backend/Classes/Form/AbstractNode.php.

References GeneralUtility\trimExplode().

Referenced by AbstractNode\getValidationDataAsDataAttribute(), InputColorPickerElement\render(), RsaInputElement\render(), InputTextElement\render(), and TextElement\render().

mergeChildReturnIntoExistingResult ( array  $existing,
array  $childReturn 
)
protected
render ( )
abstract

Handler for single nodes

Returns
array As defined in initializeResultArray() of AbstractNode

Implements NodeInterface.

Member Data Documentation