Skip to content

Commit

Permalink
!!! TASK: Remove underscore node property access sort('_*') from so…
Browse files Browse the repository at this point in the history
…rt FlowQuery
  • Loading branch information
mhsdesign committed Apr 26, 2024
1 parent 07f2c9a commit 3a35488
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit 3a35488

Please sign in to comment.