NodeTypeSchemaBuilder
class NodeTypeSchemaBuilder (View source)
Renders the Node Type Schema in a format the User Interface understands; additionally pre-calculating node constraints
Properties
protected NodeTypeManager | $nodeTypeManager |
Methods
The preprocessed node type schema contains everything we need for the UI:
In order to allow unsetting options via the YAML settings merging, the formatting options can be set via 'option': true, however, the frontend schema expects a flattened plain numeric array. This methods adjust the setting accordingly.
Generate the list of allowed sub-node-types per parent-node-type and child-node-name.
Details
array
generateNodeTypeSchema()
The preprocessed node type schema contains everything we need for the UI:
- "nodeTypes" contains the original (merged) node type schema
- "inheritanceMap.subTypes" contains for every parent type the transitive list of subtypes
- "constraints" contains for each node type, the list of allowed child node types; normalizing
allowlists and excludelists:
- [node type]
- nodeTypes:
- childNodes:
- [child node name]
- nodeTypes:
protected void
flattenAlohaFormatOptions(array $options)
In order to allow unsetting options via the YAML settings merging, the formatting options can be set via 'option': true, however, the frontend schema expects a flattened plain numeric array. This methods adjust the setting accordingly.
protected array
generateConstraints()
Generate the list of allowed sub-node-types per parent-node-type and child-node-name.