class NodeHelper implements ProtectedContextAwareInterface (View source)

Eel helper for ContentRepository Nodes

Methods

nearestContentCollection(NodeInterface $node, string $nodePath)

Check if the given node is already a collection, find collection by nodePath otherwise, throw exception if no content collection could be found

labelForNode(NodeInterface $node = null)

Generate a label for a node with a chaining mechanism. To be used in nodetype definitions.

bool
isOfType(NodeInterface $node, string $nodeType)

If this node type or any of the direct or indirect super types has the given name.

bool
allowsCallOfMethod(string $methodName)

No description

Details

NodeInterface nearestContentCollection(NodeInterface $node, string $nodePath)

Check if the given node is already a collection, find collection by nodePath otherwise, throw exception if no content collection could be found

Parameters

NodeInterface $node
string $nodePath

Return Value

NodeInterface

Exceptions

Exception

NodeLabelToken labelForNode(NodeInterface $node = null)

Generate a label for a node with a chaining mechanism. To be used in nodetype definitions.

Parameters

NodeInterface $node

Return Value

NodeLabelToken

bool isOfType(NodeInterface $node, string $nodeType)

If this node type or any of the direct or indirect super types has the given name.

Parameters

NodeInterface $node
string $nodeType

Return Value

bool

bool allowsCallOfMethod(string $methodName)

No description

Parameters

string $methodName

Return Value

bool