class PrevOperation extends AbstractOperation (View source)

"prev" operation working on ContentRepository nodes. It iterates over all context elements and returns the immediately preceding sibling.

If an optional filter expression is provided, it only returns the node if it matches the given expression.

Properties

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

Methods

bool
canEvaluate(array $context)

{@inheritdoc}

void
evaluate(FlowQuery $flowQuery, array $arguments)

{@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

the FlowQuery object

array $arguments

the arguments for this operation

Return Value

void

protected TraversableNodeInterface getPrevForNode(TraversableNodeInterface $contextNode)

No description

Parameters

TraversableNodeInterface $contextNode

The node for which the preceding node should be found

Return Value

TraversableNodeInterface

The preceding node of $contextNode or NULL