class SortByTimestampOperation extends AbstractOperation (View source)

"sortByTimestamp" operation working on ContentRepository nodes.

Sorts nodes by specified timestamp.

Properties

static protected string $shortName {@inheritdoc}

Methods

bool
canEvaluate(mixed $context)

{@inheritdoc}

void
evaluate(FlowQuery $flowQuery, array $arguments)

First argument is the timestamp to sort by like created, lastModified, originalCreated and originalLastModified Second argument is the sort direction (ASC or DESC).

Details

bool canEvaluate(mixed $context)

{@inheritdoc}

We can only handle ContentRepository Nodes.

Parameters

mixed $context

Return Value

bool

void evaluate(FlowQuery $flowQuery, array $arguments)

First argument is the timestamp to sort by like created, lastModified, originalCreated and originalLastModified Second argument is the sort direction (ASC or DESC).

sortByTimestamp("created", "ASC") sortByTimestamp("lastModified", "DESC")

Parameters

FlowQuery $flowQuery

the FlowQuery object

array $arguments

the arguments for this operation.

Return Value

void

Exceptions

FlowQueryException

See also

Timestamps for further documentation