class ChangeNodeType extends AbstractTransformation (View source)

Change the node type.

Properties

protected NodeTypeManager $nodeTypeManager
protected string $newType

The new Node Type to use as a string

Methods

bool
isTransformable(NodeData $node)

If the given node has the property this transformation should work on, this returns true if the given NodeType is registered with the NodeTypeManager and is not abstract.

execute(NodeData $node)

Change the Node Type on the given node.

void
setNewType(string $newType)

No description

Details

bool isTransformable(NodeData $node)

If the given node has the property this transformation should work on, this returns true if the given NodeType is registered with the NodeTypeManager and is not abstract.

Parameters

NodeData $node

Return Value

bool

NodeData execute(NodeData $node)

Change the Node Type on the given node.

Parameters

NodeData $node

Return Value

NodeData

void setNewType(string $newType)

No description

Parameters

string $newType

Return Value

void