diff --git a/Classes/Domain/Repository/AddressRepository.php b/Classes/Domain/Repository/AddressRepository.php index 93ff41c..467ad3b 100644 --- a/Classes/Domain/Repository/AddressRepository.php +++ b/Classes/Domain/Repository/AddressRepository.php @@ -12,7 +12,6 @@ namespace Fgtclb\AcademicPersonsEdit\Domain\Repository; use Fgtclb\AcademicPersonsEdit\Domain\Model\Address; -use Fgtclb\AcademicPersons\Domain\Model\OrganisationalUnit; use TYPO3\CMS\Extbase\Domain\Model\Category; use TYPO3\CMS\Extbase\Persistence\QueryInterface; use TYPO3\CMS\Extbase\Persistence\QueryResultInterface; @@ -28,7 +27,9 @@ class AddressRepository extends Repository */ public function getAddressFromOrganisation( ?Category $employeeType, - ?OrganisationalUnit $organisationalUnit + ?Category $organizationalLevel1, + ?Category $organizationalLevel2, + ?Category $organizationalLevel3, ): QueryResultInterface { $query = $this->createQuery(); $query->getQuerySettings()->setRespectStoragePage(false); @@ -36,7 +37,9 @@ public function getAddressFromOrganisation( $query->matching( $query->logicalAnd([ $query->equals('employeeType', $employeeType), - $query->equals('organisationalUnit', $organisationalUnit), + $query->equals('organisationalLevel1', $organizationalLevel1), + $query->equals('organisationalLevel2', $organizationalLevel2), + $query->equals('organisationalLevel3', $organizationalLevel3), ]) ); $query->setOrderings([