diff --git a/src/lib/UI/Module/ContentTree/NodeFactory.php b/src/lib/UI/Module/ContentTree/NodeFactory.php index ee283a097d..1c00d55c29 100644 --- a/src/lib/UI/Module/ContentTree/NodeFactory.php +++ b/src/lib/UI/Module/ContentTree/NodeFactory.php @@ -356,9 +356,6 @@ private function buildNode( $containerLocations[] = $location; } - $content = $location->getContent(); - $versionInfo = $content->getVersionInfo(); - $limit = $this->resolveLoadLimit($loadSubtreeRequestNode); $offset = null !== $loadSubtreeRequestNode ? $loadSubtreeRequestNode->offset @@ -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(), @@ -410,7 +401,7 @@ private function buildNode( $totalChildrenCount, $this->getReverseRelationsCount($contentInfo), isset($bookmarkLocations[$location->getId()]), - $mainLanguageCode, + $contentInfo->getMainLanguageCode(), $children, $location->getPathString() );