Skip to content

Commit

Permalink
feat: synchronize parent and child terms using the MultilingualLink r…
Browse files Browse the repository at this point in the history
…epresentation
  • Loading branch information
zhyian committed Dec 24, 2024
1 parent 74dac24 commit 4785b32
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Infrastructure/Search/FilterableTermsUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ private function retrieveParentTermId(
return 0;
}

/** @var AdmissionRequirement|Degree $flatProperty */
/** @var AdmissionRequirement|Degree|MultilingualLink $flatProperty */
$parentProperty = $flatProperty->parent();

if (is_null($parentProperty)) {
Expand Down Expand Up @@ -403,7 +403,11 @@ private function isHierarchicalProperty(
MultilingualString|MultilingualLink|AdmissionRequirement|Degree $flatProperty
): bool {

return $flatProperty instanceof Degree || $flatProperty instanceof AdmissionRequirement;
return in_array($flatProperty::class, [
Degree::class,
AdmissionRequirement::class,
MultilingualLink::class,
], true);
}

private function createTerm(TermData $termData): ?int
Expand Down

0 comments on commit 4785b32

Please sign in to comment.