class NodeType implements DoctrineFilterInterface (View source)

Filter nodes by node type.

Properties

protected NodeTypeManager $nodeTypeManager
protected string $nodeTypeName

The node type to match on.

protected bool $withSubTypes

If set to true also all subtypes of the given nodeType will match.

protected bool $exclude

If set this NodeType is actually excluded instead exclusively included.

Methods

void
setNodeType(string $nodeTypeName)

Sets the node type name to match on.

void
setWithSubTypes(bool $withSubTypes)

Whether the filter should match also on all subtypes of the configured node type.

setExclude(bool $exclude)

Whether the filter should exclude the given NodeType instead of including only this node type.

array
getFilterExpressions(Query $baseQuery)

No description

Details

void setNodeType(string $nodeTypeName)

Sets the node type name to match on.

Parameters

string $nodeTypeName

Return Value

void

void setWithSubTypes(bool $withSubTypes)

Whether the filter should match also on all subtypes of the configured node type.

Note: This can only be used with node types still available in the system!

Parameters

bool $withSubTypes

Return Value

void

setExclude(bool $exclude)

Whether the filter should exclude the given NodeType instead of including only this node type.

Parameters

bool $exclude

array getFilterExpressions(Query $baseQuery)

No description

Parameters

Query $baseQuery

Return Value

array

Exceptions

InvalidQueryException