TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Backend\Form\NodeFactory Class Reference

Public Member Functions

 __construct ()
 

Protected Member Functions

 registerAdditionalNodeTypesFromConfiguration ()
 
 initializeNodeResolver ()
 
 instantiate ($className, array $data)
 

Protected Attributes

 $nodeTypes
 
 $nodeResolver = []
 

Detailed Description

Create an element object depending on type.

Definition at line 22 of file NodeFactory.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Form\NodeFactory::__construct ( )

Member Function Documentation

◆ initializeNodeResolver()

TYPO3\CMS\Backend\Form\NodeFactory::initializeNodeResolver ( )
protected

Add resolver and add them sorted to a local property. This can be used to manipulate the nodeName to class resolution with own code.

Exceptions
Exceptionif configuration is incomplete or two resolver with identical priorities are registered

Definition at line 187 of file NodeFactory.php.

References $GLOBALS, and TYPO3\CMS\Backend\Form\NodeFactory\$nodeResolver.

Referenced by TYPO3\CMS\Backend\Form\NodeFactory\__construct().

◆ instantiate()

TYPO3\CMS\Backend\Form\NodeFactory::instantiate (   $className,
array  $data 
)
protected

Instantiate given class name

Parameters
string$classNameGiven class name
array$dataMain data array
Returns
object

Definition at line 228 of file NodeFactory.php.

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

Referenced by TYPO3\CMS\Backend\Form\NodeFactory\__construct().

◆ registerAdditionalNodeTypesFromConfiguration()

TYPO3\CMS\Backend\Form\NodeFactory::registerAdditionalNodeTypesFromConfiguration ( )
protected

Add node types from nodeRegistry to $this->nodeTypes. This can be used to add new render types or to overwrite existing node types. The registered class must implement the NodeInterface and will be called if a node with this renderType is rendered.

Exceptions
Exceptionif configuration is incomplete or two nodes with identical priorities are registered

Definition at line 144 of file NodeFactory.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Form\NodeFactory\__construct().

Member Data Documentation

◆ $nodeResolver

TYPO3\CMS\Backend\Form\NodeFactory::$nodeResolver = []
protected

◆ $nodeTypes

TYPO3\CMS\Backend\Form\NodeFactory::$nodeTypes
protected
Initial value:
= [
'flex' => Container\FlexFormEntryContainer::class

Definition at line 29 of file NodeFactory.php.