final class UniqueOperation implements OperationInterface (View source)

"unique" operation working on Nodes

This operation can be used to ensure that nodes are only once in the flow query context

${q(node).backReferences().nodes().unique()get()}

The result is an array of {\Neos\ContentRepository\Core\Projection\ContentGraph\Node} instances.

!!! This is a Node specific implementation of the generic unique operation!!!

Traits

Properties

static protected string $shortName {@inheritdoc}
static protected int $priority {@inheritdoc}

Methods

string
createNodeHash(Node $node)

Create a string hash containing the node-aggregateId, cr-id, workspace-name, dimensionSpacePoint-hash and visibilityConstraints-hash. To be used for ensuring uniqueness or removing nodes.

bool
canEvaluate(array<int, mixed> $context)

No description

void
evaluate(FlowQuery $flowQuery, array $arguments)

No description

static string
getShortName()

No description

static int
getPriority()

No description

static bool
isFinal()

No description

Details

protected string createNodeHash(Node $node)

Create a string hash containing the node-aggregateId, cr-id, workspace-name, dimensionSpacePoint-hash and visibilityConstraints-hash. To be used for ensuring uniqueness or removing nodes.

Parameters

Node $node

Return Value

string

See also

Node::equals for comparison

bool canEvaluate(array<int, mixed> $context)

No description

Parameters

array<int, mixed> $context

Return Value

bool

void evaluate(FlowQuery $flowQuery, array $arguments)

No description

Parameters

FlowQuery $flowQuery
array $arguments

Return Value

void

static string getShortName()

No description

Return Value

string

static int getPriority()

No description

Return Value

int

static bool isFinal()

No description

Return Value

bool