All Classes Namespaces Files Functions Variables Pages
NodeFactory Class Reference

Public Member Functions

 __construct ()

Protected Member Functions

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

Protected Attributes

 $nodeResolver = []

Detailed Description

Create an element object depending on type.

Definition at line 22 of file NodeFactory.php.

Constructor & Destructor Documentation

__construct ( )

Set up factory. Initialize additionally registered nodes.

Definition at line 80 of file NodeFactory.php.

References NodeFactory\initializeNodeResolver(), and NodeFactory\registerAdditionalNodeTypesFromConfiguration().

Member Function Documentation

initializeNodeResolver ( )

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

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

Definition at line 188 of file NodeFactory.php.

References $GLOBALS, and NodeFactory\$nodeResolver.

Referenced by NodeFactory\__construct().

instantiate (   $className,
array  $data 

Instantiate given class name

string$classNameGiven class name
array$dataMain data array

Definition at line 229 of file NodeFactory.php.

References GeneralUtility\makeInstance().

registerAdditionalNodeTypesFromConfiguration ( )

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.

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

Definition at line 145 of file NodeFactory.php.

References $GLOBALS.

Referenced by NodeFactory\__construct().

Member Data Documentation

$nodeResolver = []

Definition at line 75 of file NodeFactory.php.

Referenced by NodeFactory\initializeNodeResolver().

Initial value:
= [
'flex' => Container\FlexFormEntryContainer::class

Definition at line 29 of file NodeFactory.php.