class NodeFilter (View source)

Service to determine if a given node matches a series of filters given by configuration.

Properties

protected ObjectManagerInterface $objectManager
protected array $filterConjunctions

Methods

array
getFilterExpressions(array $filterConfigurations, Query $baseQuery)

Return array with Doctrine expressions

bool
matchFilters(NodeData $nodeData, array $filterConfiguration)

Apply local filters to result.

FilterInterface[]
buildFilterConjunction(array $filterConfigurations)

No description

constructFilterObject(array $filterConfiguration)

No description

string
resolveFilterClass(string $name)

Resolves the class name for the filter by first assuming it is a full qualified class name and otherwise searching in this package (so filters delivered in Neos.ContentRepository can be used by simply giving the class name without namespace).

Details

array getFilterExpressions(array $filterConfigurations, Query $baseQuery)

Return array with Doctrine expressions

Parameters

array $filterConfigurations
Query $baseQuery

Return Value

array

Exceptions

MigrationException

bool matchFilters(NodeData $nodeData, array $filterConfiguration)

Apply local filters to result.

Parameters

NodeData $nodeData
array $filterConfiguration

Return Value

bool

Exceptions

MigrationException

protected FilterInterface[] buildFilterConjunction(array $filterConfigurations)

No description

Parameters

array $filterConfigurations

Return Value

FilterInterface[]

Exceptions

MigrationException

protected FilterInterface|DoctrineFilterInterface constructFilterObject(array $filterConfiguration)

No description

Parameters

array $filterConfiguration

Return Value

FilterInterface|DoctrineFilterInterface

Exceptions

MigrationException

protected string resolveFilterClass(string $name)

Resolves the class name for the filter by first assuming it is a full qualified class name and otherwise searching in this package (so filters delivered in Neos.ContentRepository can be used by simply giving the class name without namespace).

Parameters

string $name

Return Value

string

Exceptions

MigrationException