14
14
use Neos \ContentRepository \Core \Projection \ContentGraph \Filter \FindClosestNodeFilter ;
15
15
use Neos \ContentRepository \Core \Projection \ContentGraph \Node ;
16
16
use Neos \ContentRepository \Core \Projection \ContentGraph \VisibilityConstraints ;
17
+ use Neos \ContentRepository \Core \SharedModel \Node \NodeAddress ;
17
18
use Neos \ContentRepository \Core \SharedModel \ContentRepository \ContentRepositoryId ;
18
19
use Neos \ContentRepository \Core \SharedModel \Workspace \WorkspaceName ;
19
20
use Neos \ContentRepositoryRegistry \ContentRepositoryRegistry ;
20
21
use Neos \Flow \Annotations as Flow ;
21
22
use Neos \Neos \Domain \Service \NodeTypeNameFactory ;
22
23
use Neos \Neos \Domain \Service \WorkspacePublishingService ;
23
- use Neos \Neos \FrontendRouting \NodeAddress ;
24
- use Neos \Neos \FrontendRouting \NodeAddressFactory ;
25
24
use Neos \Neos \PendingChangesProjection \Change ;
26
25
use Neos \Neos \Utility \NodeTypeWithFallbackProvider ;
27
26
@@ -57,26 +56,26 @@ public function getPublishableNodeInfo(WorkspaceName $workspaceName, ContentRepo
57
56
$ unpublishedNodes = [];
58
57
foreach ($ pendingChanges as $ change ) {
59
58
if ($ change ->removalAttachmentPoint ) {
60
- $ nodeAddress = new NodeAddress (
61
- $ change ->contentStreamId ,
59
+ $ nodeAddress = NodeAddress::create (
60
+ $ contentRepositoryId ,
61
+ $ workspaceName ,
62
62
$ change ->originDimensionSpacePoint ->toDimensionSpacePoint (),
63
- $ change ->nodeAggregateId ,
64
- $ workspaceName
63
+ $ change ->nodeAggregateId
65
64
);
66
65
67
66
/**
68
67
* See {@see Remove::apply} -> Removal Attachment Point == closest document node.
69
68
*/
70
- $ documentNodeAddress = new NodeAddress (
71
- $ change ->contentStreamId ,
69
+ $ documentNodeAddress = NodeAddress::create (
70
+ $ contentRepositoryId ,
71
+ $ workspaceName ,
72
72
$ change ->originDimensionSpacePoint ->toDimensionSpacePoint (),
73
- $ change ->removalAttachmentPoint ,
74
- $ workspaceName
73
+ $ change ->removalAttachmentPoint
75
74
);
76
75
77
76
$ unpublishedNodes [] = [
78
- 'contextPath ' => $ nodeAddress ->serializeForUri (),
79
- 'documentContextPath ' => $ documentNodeAddress ->serializeForUri (),
77
+ 'contextPath ' => $ nodeAddress ->toJson (),
78
+ 'documentContextPath ' => $ documentNodeAddress ->toJson (),
80
79
'typeOfChange ' => $ this ->getTypeOfChange ($ change )
81
80
];
82
81
} else {
@@ -89,11 +88,9 @@ public function getPublishableNodeInfo(WorkspaceName $workspaceName, ContentRepo
89
88
if ($ node instanceof Node) {
90
89
$ documentNode = $ subgraph ->findClosestNode ($ node ->aggregateId , FindClosestNodeFilter::create (nodeTypes: NodeTypeNameFactory::NAME_DOCUMENT ));
91
90
if ($ documentNode instanceof Node) {
92
- $ nodeAddressFactory = NodeAddressFactory::create ($ contentRepository );
93
91
$ unpublishedNodes [] = [
94
- 'contextPath ' => $ nodeAddressFactory ->createFromNode ($ node )->serializeForUri (),
95
- 'documentContextPath ' => $ nodeAddressFactory ->createFromNode ($ documentNode )
96
- ->serializeForUri (),
92
+ 'contextPath ' => NodeAddress::fromNode ($ node )->toJson (),
93
+ 'documentContextPath ' => NodeAddress::fromNode ($ documentNode )->toJson (),
97
94
'typeOfChange ' => $ this ->getTypeOfChange ($ change )
98
95
];
99
96
}
0 commit comments