diff --git a/src/Dravencms/Model/Locale/Repository/LocaleRepository.php b/src/Dravencms/Model/Locale/Repository/LocaleRepository.php index eea88e8..73a76d9 100644 --- a/src/Dravencms/Model/Locale/Repository/LocaleRepository.php +++ b/src/Dravencms/Model/Locale/Repository/LocaleRepository.php @@ -54,6 +54,15 @@ public function getOneByLanguageCode($languageCode) { return $this->localeRepository->findOneBy(['languageCode' => $languageCode]); } + + /** + * @param $languageCode string + * @return mixed|null|Locale + */ + public function getOneActiveByLanguageCode($languageCode) + { + return $this->localeRepository->findOneBy(['languageCode' => $languageCode, 'isActive' => true]); + } /** * @return array @@ -173,4 +182,4 @@ public function getLocaleCache($languageCode) return $found; } } -} \ No newline at end of file +}