diff --git a/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQueryHandler.php b/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQueryHandler.php index 4c701c9..b9cd044 100644 --- a/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQueryHandler.php +++ b/Classes/Application/GetChildrenForTreeNode/GetChildrenForTreeNodeQueryHandler.php @@ -12,7 +12,6 @@ namespace Sitegeist\Archaeopteryx\Application\GetChildrenForTreeNode; -use GuzzleHttp\Psr7\Uri; use Neos\ContentRepository\Domain\Model\Node; use Neos\ContentRepository\Domain\Model\NodeType; use Neos\ContentRepository\Domain\NodeType\NodeTypeName; @@ -71,7 +70,6 @@ private function createTreeNodeFromNode(Node $node, GetChildrenForTreeNodeQuery { return new TreeNode( nodeAggregateIdentifier: $node->getNodeAggregateIdentifier(), - uri: new Uri('node://' . $node->getNodeAggregateIdentifier()), icon: $node->getNodeType()->getConfiguration('ui.icon'), label: $node->getLabel(), nodeTypeLabel: $node->getNodeType()->getLabel(), diff --git a/Classes/Application/Shared/TreeNode.php b/Classes/Application/Shared/TreeNode.php index 46ac64f..a6f1d2b 100644 --- a/Classes/Application/Shared/TreeNode.php +++ b/Classes/Application/Shared/TreeNode.php @@ -14,7 +14,6 @@ use Neos\ContentRepository\Domain\NodeAggregate\NodeAggregateIdentifier; use Neos\ContentRepository\Domain\NodeType\NodeTypeName; -use Psr\Http\Message\UriInterface; use Neos\Flow\Annotations as Flow; /** @@ -28,7 +27,6 @@ final class TreeNode implements \JsonSerializable */ public function __construct( public readonly NodeAggregateIdentifier $nodeAggregateIdentifier, - public readonly UriInterface $uri, public readonly string $icon, public readonly string $label, public readonly string $nodeTypeLabel, @@ -44,10 +42,7 @@ public function __construct( public function jsonSerialize(): mixed { - $result = get_object_vars($this); - $result['uri'] = (string) $result['uri']; - - return $result; + return get_object_vars($this); } /** diff --git a/Classes/Application/Shared/TreeNodeBuilder.php b/Classes/Application/Shared/TreeNodeBuilder.php index 55fa007..8e394e1 100644 --- a/Classes/Application/Shared/TreeNodeBuilder.php +++ b/Classes/Application/Shared/TreeNodeBuilder.php @@ -12,12 +12,10 @@ namespace Sitegeist\Archaeopteryx\Application\Shared; -use GuzzleHttp\Psr7\Uri; use Neos\ContentRepository\Domain\Model\Node; use Neos\ContentRepository\Domain\Model\NodeType; use Neos\ContentRepository\Domain\NodeAggregate\NodeAggregateIdentifier; use Neos\ContentRepository\Domain\NodeType\NodeTypeName; -use Psr\Http\Message\UriInterface; use Neos\Flow\Annotations as Flow; /** @@ -36,7 +34,6 @@ final class TreeNodeBuilder private function __construct( public readonly int $sortingIndex, private NodeAggregateIdentifier $nodeAggregateIdentifier, - private UriInterface $uri, private string $icon, private string $label, private string $nodeTypeLabel, @@ -56,7 +53,6 @@ public static function fromNode(Node $node): self // @phpstan-ignore-next-line sortingIndex: $node->getIndex() ?? 0, nodeAggregateIdentifier: $node->getNodeAggregateIdentifier(), - uri: new Uri('node://' . $node->getNodeAggregateIdentifier()), icon: $node->getNodeType()->getConfiguration('ui.icon') ?? 'questionmark', label: $node->getLabel(), nodeTypeLabel: $node->getNodeType()->getLabel(), @@ -101,7 +97,6 @@ public function build(): TreeNode { return new TreeNode( nodeAggregateIdentifier: $this->nodeAggregateIdentifier, - uri: $this->uri, icon: $this->icon, label: $this->label, nodeTypeLabel: $this->nodeTypeLabel, diff --git a/Neos.Ui/custom-node-tree/src/domain/TreeNodeDTO.ts b/Neos.Ui/custom-node-tree/src/domain/TreeNodeDTO.ts index 4f34d24..85f83fe 100644 --- a/Neos.Ui/custom-node-tree/src/domain/TreeNodeDTO.ts +++ b/Neos.Ui/custom-node-tree/src/domain/TreeNodeDTO.ts @@ -7,7 +7,6 @@ */ export type TreeNodeDTO = { nodeAggregateIdentifier: string; - uri: string; icon: string; label: string; nodeTypeLabel: string;