NeosNodeService
class NeosNodeService extends NodeService implements NeosNodeServiceInterface (View source)
Properties
protected NodeTypeManager | $nodeTypeManager | from NodeService | |
protected NodeDataRepository | $nodeDataRepository | from NodeService | |
protected ContextFactory | $contextFactory | from NodeService |
Methods
Removes all auto created child nodes that existed in the previous nodeType.
Remove all properties not configured in the current Node Type.
Checks if the given node path exists in any possible context already.
Checks if the given node path can be used for the given node.
Normalizes the given node path to a reference path and returns an absolute path.
Generate a node name, optionally based on a suggested "ideal" name
Generate possible node name. When an idealNodeName is given then this is put into a valid format for a node name, otherwise a random node name in the form "node-alphanumeric" is generated.
Details
void
setDefaultValues(NodeInterface $node)
Sets default node property values on the given node.
void
createChildNodes(NodeInterface $node)
Creates missing child nodes for the given node.
void
cleanUpAutoCreatedChildNodes(NodeInterface $node, NodeType $oldNodeType)
Removes all auto created child nodes that existed in the previous nodeType.
void
cleanUpProperties(NodeInterface $node)
Remove all properties not configured in the current Node Type.
This will not do anything on Nodes marked as removed as those could be queued up for deletion which contradicts updates (that would be necessary to remove the properties).
bool
isNodeOfType(NodeInterface $node, NodeType $nodeType)
No description
bool
nodePathExistsInAnyContext(string $nodePath)
Checks if the given node path exists in any possible context already.
bool
nodePathAvailableForNode(string $nodePath, NodeInterface $node)
Checks if the given node path can be used for the given node.
string
normalizePath(string $path, string $referencePath = null, string $siteNodePath = null)
Normalizes the given node path to a reference path and returns an absolute path.
string
generateUniqueNodeName(string $parentPath, string $idealNodeName = null)
Generate a node name, optionally based on a suggested "ideal" name
protected string
generatePossibleNodeName(string $idealNodeName = null)
Generate possible node name. When an idealNodeName is given then this is put into a valid format for a node name, otherwise a random node name in the form "node-alphanumeric" is generated.