class FilterOperation extends FilterOperation (View source)

This filter implementation contains specific behavior for use on ContentRepository nodes. It will not evaluate any elements that are not instances of the NodeInterface.

The implementation changes the behavior of the instanceof operator to work on node types instead of PHP object types, so that::

[instanceof Acme.Com:Page]

will in fact use isOfType() on the NodeType of context elements to filter. This filter allow also to filter the current context by a given node. Anything else remains unchanged.

Properties

static protected int $priority {@inheritdoc}

Methods

bool
canEvaluate(array $context)

{@inheritdoc}

void
evaluate(FlowQuery $flowQuery, array $arguments)

{@inheritdoc}

bool
matchesPropertyNameFilter(object $element, string $propertyNameFilter)

{@inheritdoc}

bool
matchesIdentifierFilter(NodeInterface $element, string $identifier)

{@inheritdoc}

mixed
getPropertyPath(NodeInterface $element, string $propertyPath)

{@inheritdoc}

bool
evaluateOperator(mixed $value, string $operator, mixed $operand)

{@inheritdoc}

Details

bool canEvaluate(array $context)

{@inheritdoc}

Parameters

array $context

$context onto which this operation should be applied (array or array-like object)

Return Value

bool

true if the operation can be applied onto the $context, false otherwise

void evaluate(FlowQuery $flowQuery, array $arguments)

{@inheritdoc}

Parameters

FlowQuery $flowQuery
array $arguments

Return Value

void

protected bool matchesPropertyNameFilter(object $element, string $propertyNameFilter)

{@inheritdoc}

Parameters

object $element
string $propertyNameFilter

Return Value

bool

true if the property name filter matches

protected bool matchesIdentifierFilter(NodeInterface $element, string $identifier)

{@inheritdoc}

Parameters

NodeInterface $element
string $identifier

Return Value

bool

protected mixed getPropertyPath(NodeInterface $element, string $propertyPath)

{@inheritdoc}

Parameters

NodeInterface $element
string $propertyPath

Return Value

mixed

protected bool evaluateOperator(mixed $value, string $operator, mixed $operand)

{@inheritdoc}

Parameters

mixed $value
string $operator
mixed $operand

Return Value

bool