From 8e4298f0dca676549e68a8044c0632af5434d69b 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 6b00ac65500..38464a0ab02 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(); }