diff --git a/Persistence/Content/Language/Handler.php b/Persistence/Content/Language/Handler.php index d6481021b..37a711756 100644 --- a/Persistence/Content/Language/Handler.php +++ b/Persistence/Content/Language/Handler.php @@ -42,6 +42,18 @@ public function update(Language $struct); */ public function load($id); + /** + * Get list of languages by id. + * + * Missing items (NotFound) will be missing from the returned iterable and not cause an exception, it's up + * to calling logic to determine if this should cause exception or not. + * + * @param array $ids + * + * @return \eZ\Publish\SPI\Persistence\Content\Language[]|iterable + */ + public function loadList(array $ids): iterable; + /** * Get language by Language Code (eg: eng-GB). * @@ -53,6 +65,18 @@ public function load($id); */ public function loadByLanguageCode($languageCode); + /** + * Get list of languages by Language Code (eg: eng-GB). + * + * Missing items (NotFound) will be missing from the returned iterable and not cause an exception, it's up + * to calling logic to determine if this should cause exception or not. + * + * @param string[] $languageCodes + * + * @return \eZ\Publish\SPI\Persistence\Content\Language[]|iterable + */ + public function loadListByLanguageCodes(array $languageCodes): iterable; + /** * Get all languages. *