From 7bd14c01d9192407e60085364de69dcec9dc6d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edi=20Modri=C4=87?= Date: Tue, 18 Sep 2018 11:07:11 +0200 Subject: [PATCH] Add user preference service to aggregate repository implementation --- lib/Core/Repository/Aggregate/Repository.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/Core/Repository/Aggregate/Repository.php b/lib/Core/Repository/Aggregate/Repository.php index 2f751305..2ed5b5cd 100644 --- a/lib/Core/Repository/Aggregate/Repository.php +++ b/lib/Core/Repository/Aggregate/Repository.php @@ -97,6 +97,15 @@ public function getNotificationService() return $this->ezRepository->getNotificationService(); } + public function getUserPreferenceService() + { + if (!method_exists($this->ezRepository, 'getUserPreferenceService')) { + throw new RuntimeException(sprintf('getUserPreferenceService method does not exist in %s class', get_class($this->ezRepository))); + } + + return $this->ezRepository->getUserPreferenceService(); + } + public function getContentService() { return $this->ezRepository->getContentService();