TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NodeFactory Class Reference

Public Member Functions

 __construct ()
 

Protected Member Functions

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

Protected Attributes

 $nodeTypes
 
 $nodeResolver = array()
 

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 79 of file NodeFactory.php.

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

Member Function Documentation

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 184 of file NodeFactory.php.

References $GLOBALS, and NodeFactory\$nodeResolver.

Referenced by NodeFactory\__construct().

instantiate (   $className,
array  $data 
)
protected

Instantiate given class name

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

Definition at line 225 of file NodeFactory.php.

References GeneralUtility\makeInstance().

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 141 of file NodeFactory.php.

References $GLOBALS.

Referenced by NodeFactory\__construct().

Member Data Documentation

$nodeResolver = array()
protected

Definition at line 74 of file NodeFactory.php.

Referenced by NodeFactory\initializeNodeResolver().

$nodeTypes
protected

Definition at line 29 of file NodeFactory.php.