class FindOperation extends AbstractOperation (View source)

"find" operation working on ContentRepository nodes. This operation allows for retrieval of nodes specified by a path, identifier or node type (recursive).

Example (node name):

q(node).find('main')

Example (relative path):

q(node).find('main/text1')

Example (absolute path):

q(node).find('/sites/my-site/home')

Example (identifier):

q(node).find('#30e893c1-caef-0ca5-b53d-e5699bb8e506')

Example (node type):

q(node).find('[instanceof Acme.Com:Text]')

Example (multiple node types):

q(node).find('[instanceof Acme.Com:Text],[instanceof Acme.Com:Image]')

Example (node type with filter):

q(node).find('[instanceof Acme.Com:Text][text*="Neos"]')

Properties

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

Methods

bool
canEvaluate(array $context)

{@inheritdoc}

void
evaluate(FlowQuery $flowQuery, array $arguments)

This operation operates rather on the given Context object than on the given node and thus may work with the legacy node interface until subgraphs are available {@inheritdoc}

bool
hasOnlyInstanceOfFilters(array $filters)

Check if the parsed filters only contain instanceof filters (e.g. "[instanceof Foo],[instanceof Bar]")

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)

This operation operates rather on the given Context object than on the given node and thus may work with the legacy node interface until subgraphs are available {@inheritdoc}

Parameters

FlowQuery $flowQuery

the FlowQuery object

array $arguments

the arguments for this operation

Return Value

void

Exceptions

FlowQueryException
Exception
FizzleException

protected bool hasOnlyInstanceOfFilters(array $filters)

Check if the parsed filters only contain instanceof filters (e.g. "[instanceof Foo],[instanceof Bar]")

Parameters

array $filters

Return Value

bool