Skip to content

Commit

Permalink
FEATURE: make Filter and Property access aware of (deprecated) _ident…
Browse files Browse the repository at this point in the history
…ifier notation
  • Loading branch information
skurfuerst committed Apr 20, 2023
1 parent d8a338b commit 7ac9942
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Expand Up @@ -116,7 +116,10 @@ protected function matchesIdentifierFilter($element, $identifier)
*/
protected function getPropertyPath($element, $propertyPath)
{
if ($propertyPath[0] === '_' && $propertyPath !== '_hiddenInIndex') {
if ($propertyPath === '_identifier') {
// TODO: deprecated (Neos <9 case)
return $element->nodeAggregateId->value;
} elseif ($propertyPath[0] === '_' && $propertyPath !== '_hiddenInIndex') {
return ObjectAccess::getPropertyPath($element, substr($propertyPath, 1));
} else {
return $element->getProperty($propertyPath);
Expand Down
Expand Up @@ -94,6 +94,10 @@ public function evaluate(FlowQuery $flowQuery, array $arguments): mixed
$subgraph = $this->contentRepositoryRegistry->subgraphForNode($element);
return $subgraph->retrieveNodePath($element->nodeAggregateId)->value;
}
if ($propertyName === '_identifier') {
// TODO: deprecated (Neos <9 case)
return $element->nodeAggregateId->value;
}

if ($propertyName[0] === '_') {
return ObjectAccess::getPropertyPath($element, substr($propertyName, 1));
Expand Down

0 comments on commit 7ac9942

Please sign in to comment.