diff --git a/Classes/Domain/Repository/StudyCourseRepository.php b/Classes/Domain/Repository/StudyCourseRepository.php index aed0510d..d259b5c7 100644 --- a/Classes/Domain/Repository/StudyCourseRepository.php +++ b/Classes/Domain/Repository/StudyCourseRepository.php @@ -51,7 +51,15 @@ public function findAllFilteredByOptions($options): QueryResultInterface $query->equals($name, null), ); } else { - $constraints[] = $query->in($name . '.uid', $array); + $filterKey = array_keys(array_combine(array_keys($settings['filters'] ?? []), array_column($settings['filters'] ?? [], 'propertyPath')),$name); + $filter = $settings['filters'][$filterKey[0]] ?? []; + if ($filter !== []) { + if ($filter['type'] === 'integer') { + $constraints[] = $query->in($name , $array); + } else { + $constraints[] = $query->in($name . '.uid', $array); + } + } } } diff --git a/Configuration/TypoScript/Main/setup.typoscript b/Configuration/TypoScript/Main/setup.typoscript index 34493431..ce577bfd 100644 --- a/Configuration/TypoScript/Main/setup.typoscript +++ b/Configuration/TypoScript/Main/setup.typoscript @@ -78,11 +78,19 @@ plugin.tx_in2studyfinder { # disabledInFrontend = 1 } - # credits { - # type = boolean - # propertyPath = ectsCredits - # frontendLabel = FrontendLabel - # } + # credits { + # type = boolean + # propertyPath = ectsCredits + # frontendLabel = FrontendLabel + # } + + # courses { + # type = integer + # singleSelect = 0 + # propertyPath = uid + # disabledInFrontend = 1 + # frontendLabel = Studycourse + # } } backend {