Skip to content

Commit

Permalink
IBX-8534: Fixed missing loadRelation method on ContentHandler (#79)
Browse files Browse the repository at this point in the history
* IBX-8534: Fixed missing loadRelation method on ContentHandler

* Update src/lib/FieldMapper/ContentTranslationFieldMapper/ContentDocumentFulltextFields.php

Co-authored-by: Konrad Oboza <[email protected]>

---------

Co-authored-by: Konrad Oboza <[email protected]>
  • Loading branch information
ViniTou and konradoboza authored Nov 21, 2024
1 parent da045c3 commit 1485af2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,11 @@ private function doMapFields(Content $content, ContentType $contentType, $langua
*/
private function doMapRelatedFields(Content $sourceContent, $languageCode, $maxDepth, $depth)
{
$relations = $this->contentHandler->loadRelations($sourceContent->versionInfo->contentInfo->id);
$sourceContentId = $sourceContent->versionInfo->contentInfo->id;
$relations = $this->contentHandler->loadRelationList(
$sourceContentId,
$this->contentHandler->countRelations($sourceContentId)
);

$relatedContents = $this->contentHandler->loadContentList(
array_map(static function (Content\Relation $relation) {
Expand Down

0 comments on commit 1485af2

Please sign in to comment.