|
@@ 56-74 (lines=19) @@
|
| 53 |
|
/** |
| 54 |
|
* {@inheritdoc} |
| 55 |
|
*/ |
| 56 |
|
public function load($locationId, array $translations = null, bool $useAlwaysAvailable = true) |
| 57 |
|
{ |
| 58 |
|
$keySuffix = '-' . $this->getCacheTranslationKey($translations, $useAlwaysAvailable); |
| 59 |
|
$getLocationKeysFn = $this->getLocationKeys; |
| 60 |
|
|
| 61 |
|
|
| 62 |
|
return $this->getCacheValue( |
| 63 |
|
$locationId, |
| 64 |
|
'ez-location-', |
| 65 |
|
function ($id) use ($translations, $useAlwaysAvailable) { |
| 66 |
|
return $this->persistenceHandler->locationHandler()->load($id, $translations, $useAlwaysAvailable); |
| 67 |
|
}, |
| 68 |
|
$this->getLocationTags, |
| 69 |
|
static function(Location $location) use ($keySuffix, $getLocationKeysFn) { |
| 70 |
|
return $getLocationKeysFn($location, $keySuffix); |
| 71 |
|
}, |
| 72 |
|
$keySuffix |
| 73 |
|
); |
| 74 |
|
} |
| 75 |
|
|
| 76 |
|
public function loadList(array $locationIds, array $translations = null, bool $useAlwaysAvailable = true): iterable |
| 77 |
|
{ |
|
@@ 76-94 (lines=19) @@
|
| 73 |
|
); |
| 74 |
|
} |
| 75 |
|
|
| 76 |
|
public function loadList(array $locationIds, array $translations = null, bool $useAlwaysAvailable = true): iterable |
| 77 |
|
{ |
| 78 |
|
$keySuffix = '-' . $this->getCacheTranslationKey($translations, $useAlwaysAvailable); |
| 79 |
|
$getLocationKeysFn = $this->getLocationKeys; |
| 80 |
|
|
| 81 |
|
|
| 82 |
|
return $this->getMultipleCacheValues( |
| 83 |
|
$locationIds, |
| 84 |
|
'ez-location-', |
| 85 |
|
function ($id) use ($translations, $useAlwaysAvailable) { |
| 86 |
|
return $this->persistenceHandler->locationHandler()->load($id, $translations, $useAlwaysAvailable); |
| 87 |
|
}, |
| 88 |
|
$this->getLocationTags, |
| 89 |
|
static function(Location $location) use ($keySuffix, $getLocationKeysFn) { |
| 90 |
|
return $getLocationKeysFn($location, $keySuffix); |
| 91 |
|
}, |
| 92 |
|
$keySuffix |
| 93 |
|
); |
| 94 |
|
} |
| 95 |
|
|
| 96 |
|
/** |
| 97 |
|
* {@inheritdoc} |