Skip to content

Commit

Permalink
IBX-9289: Remove dependency on Content
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 committed Dec 5, 2024
1 parent 3a9c5c6 commit 2b2b22f
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/lib/UI/Module/ContentTree/NodeFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,6 @@ private function buildNode(
$containerLocations[] = $location;
}

$content = $location->getContent();
$versionInfo = $content->getVersionInfo();

$limit = $this->resolveLoadLimit($loadSubtreeRequestNode);
$offset = null !== $loadSubtreeRequestNode
? $loadSubtreeRequestNode->offset
Expand Down Expand Up @@ -391,17 +388,11 @@ private function buildNode(
}
}

//TODO tylko tego nie mamy
//$translations = $versionInfo->getLanguageCodes();

//TODO to mozemy z lokacji
$mainLanguageCode = $location->getContentInfo()->getMainLanguageCode();

return new Node(
$depth,
$location->getId(),
$location->getContentId(),
$versionInfo->getVersionNo(),
$contentInfo->currentVersionNo,
'', // node name will be provided later by `supplyTranslatedContentName` method
null !== $contentType ? $contentType->getIdentifier() : '',
null === $contentType || $contentType->isContainer(),
Expand All @@ -410,7 +401,7 @@ private function buildNode(
$totalChildrenCount,
$this->getReverseRelationsCount($contentInfo),
isset($bookmarkLocations[$location->getId()]),
$mainLanguageCode,
$contentInfo->getMainLanguageCode(),
$children,
$location->getPathString()
);
Expand Down

0 comments on commit 2b2b22f

Please sign in to comment.