Skip to content

Commit

Permalink
TASK: Adjust FindClosestNodeFilter::create(nodeTypeConstraints)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed Oct 26, 2023
1 parent 7f475c8 commit ee78347
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Classes/ContentRepository/Service/WorkspaceService.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function getPublishableNodeInfo(WorkspaceName $workspaceName, ContentRepo
$node = $subgraph->findNodeById($change->nodeAggregateId);

if ($node instanceof Node) {
$documentNode = $subgraph->findClosestNode($node->nodeAggregateId, FindClosestNodeFilter::create(nodeTypeConstraints: NodeTypeNameFactory::NAME_DOCUMENT));
$documentNode = $subgraph->findClosestNode($node->nodeAggregateId, FindClosestNodeFilter::create(nodeTypes: NodeTypeNameFactory::NAME_DOCUMENT));
if ($documentNode instanceof Node) {
$contentRepository = $this->contentRepositoryRegistry->get($documentNode->subgraphIdentity->contentRepositoryId);
$nodeAddressFactory = NodeAddressFactory::create($contentRepository);
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Model/AbstractChange.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected function updateWorkspaceInfo(): void
{
if (!is_null($this->subject)) {
$subgraph = $this->contentRepositoryRegistry->subgraphForNode($this->subject);
$documentNode = $subgraph->findClosestNode($this->subject->nodeAggregateId, FindClosestNodeFilter::create(nodeTypeConstraints: NodeTypeNameFactory::NAME_DOCUMENT));
$documentNode = $subgraph->findClosestNode($this->subject->nodeAggregateId, FindClosestNodeFilter::create(nodeTypes: NodeTypeNameFactory::NAME_DOCUMENT));
if (!is_null($documentNode)) {
$contentRepository = $this->contentRepositoryRegistry->get($this->subject->subgraphIdentity->contentRepositoryId);
$workspace = $contentRepository->getWorkspaceFinder()->findOneByCurrentContentStreamId(
Expand Down
2 changes: 1 addition & 1 deletion Classes/Domain/Model/Changes/Remove.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function apply(): void
$this->updateWorkspaceInfo();

$subgraph = $this->contentRepositoryRegistry->subgraphForNode($this->subject);
$closestDocumentParentNode = $subgraph->findClosestNode($this->subject->nodeAggregateId, FindClosestNodeFilter::create(nodeTypeConstraints: NodeTypeNameFactory::NAME_DOCUMENT));
$closestDocumentParentNode = $subgraph->findClosestNode($this->subject->nodeAggregateId, FindClosestNodeFilter::create(nodeTypes: NodeTypeNameFactory::NAME_DOCUMENT));
$command = RemoveNodeAggregate::create(
$subject->subgraphIdentity->contentStreamId,
$subject->nodeAggregateId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function serializePayload(ControllerContext $controllerContext): array
$nodeInfoHelper = new NodeInfoHelper();

$documentNode = $this->contentRepositoryRegistry->subgraphForNode($this->node)
->findClosestNode($this->node->nodeAggregateId, FindClosestNodeFilter::create(nodeTypeConstraints: NodeTypeNameFactory::NAME_DOCUMENT));
->findClosestNode($this->node->nodeAggregateId, FindClosestNodeFilter::create(nodeTypes: NodeTypeNameFactory::NAME_DOCUMENT));

if ($documentNode) {
return [
Expand Down

0 comments on commit ee78347

Please sign in to comment.