NodeFactory
Create an element object depending on renderType.
This is the main factory to instantiate any node within the render chain of FormEngine. All nodes must implement NodeInterface.
Nodes are "container" classes of the render chain, "element" classes that render single elements, as well as "fieldWizard", "fieldInformation" and "fieldControl" classes which are called by single elements to enrich them.
This factory gets a string "renderType" and then looks up in a list which specific class should handle this renderType. This list can be extended with own renderTypes by extensions, existing renderTypes can be overridden, and
- for complex cases - it is possible to register own resolver classes for single renderTypes that can return a node class name to override the default lookup list.
Tags
Table of Contents
Methods
- __construct() : mixed
- create() : NodeInterface
- Create a node depending on type
Methods
__construct()
public
__construct() : mixed
create()
Create a node depending on type
public
create(array<string|int, mixed> $data) : NodeInterface
Parameters
- $data : array<string|int, mixed>
-
All information to decide which class should be instantiated and given down to sub nodes