From 3a35488e825a7ccaf915872ce026af8c7fe650c0 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Fri, 26 Apr 2024 10:38:09 +0200 Subject: [PATCH] !!! TASK: Remove underscore node property access `sort('_*')` from sort FlowQuery --- .../Classes/FlowQueryOperations/SortOperation.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/SortOperation.php b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/SortOperation.php index c177066a4c6..933c440cee4 100644 --- a/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/SortOperation.php +++ b/Neos.ContentRepository.NodeAccess/Classes/FlowQueryOperations/SortOperation.php @@ -113,12 +113,9 @@ public function evaluate(FlowQuery $flowQuery, array $arguments) // Determine the property value to sort by foreach ($nodes as $node) { - if ($sortProperty[0] === '_') { - $propertyValue = \Neos\Utility\ObjectAccess::getPropertyPath($node, substr($sortProperty, 1)); - } else { - $propertyValue = $node->getProperty($sortProperty); - } + $propertyValue = $node->getProperty($sortProperty); + // todo how to sort by creation date in Neos 9?? Something like node.timestamps.originalCreated if ($propertyValue instanceof \DateTime) { $propertyValue = $propertyValue->getTimestamp(); }