Skip to content
Permalink
Browse files

EZP-30006: As a Developer I possibility to load several languages at …

…once (#2524)

Introduces API to load several languages at once (specifically by id or locale), exposes more specific methods on languageMask handler and in SPI to make language handling more efficient.
  • Loading branch information...
andrerom committed Feb 19, 2019
1 parent 32c84b7 commit fc960a68c375ecf574c6d25a4c2d337b65633975
Showing with 24 additions and 0 deletions.
  1. +24 −0 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.
*

0 comments on commit fc960a6

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.