|
@@ 247-257 (lines=11) @@
|
| 244 |
|
// Build locations using the bulk retrieved content info and bulk lazy loaded content proxies. |
| 245 |
|
$locations = []; |
| 246 |
|
$permissionResolver = $this->repository->getPermissionResolver(); |
| 247 |
|
foreach ($spiLocations as $spiLocation) { |
| 248 |
|
$location = $this->domainMapper->buildLocationWithContent( |
| 249 |
|
$spiLocation, |
| 250 |
|
$contentProxyList[$spiLocation->contentId], |
| 251 |
|
$spiContentInfoList[$spiLocation->contentId] |
| 252 |
|
); |
| 253 |
|
|
| 254 |
|
if ($permissionResolver->canUser('content', 'read', $location->getContentInfo(), [$location])) { |
| 255 |
|
$locations[$spiLocation->id] = $location; |
| 256 |
|
} |
| 257 |
|
} |
| 258 |
|
|
| 259 |
|
return $locations; |
| 260 |
|
} |
|
@@ 371-381 (lines=11) @@
|
| 368 |
|
$permissionResolver = $this->repository->getPermissionResolver(); |
| 369 |
|
$spiContentInfoList = $this->persistenceHandler->contentHandler()->loadContentInfoList($contentIds); |
| 370 |
|
$contentList = $this->domainMapper->buildContentProxyList($spiContentInfoList, $prioritizedLanguages ?: []); |
| 371 |
|
foreach ($spiLocations as $spiLocation) { |
| 372 |
|
$location = $this->domainMapper->buildLocationWithContent( |
| 373 |
|
$spiLocation, |
| 374 |
|
$contentList[$spiLocation->contentId], |
| 375 |
|
$spiContentInfoList[$spiLocation->contentId] |
| 376 |
|
); |
| 377 |
|
|
| 378 |
|
if ($permissionResolver->canUser('content', 'read', $location->getContentInfo(), [$location])) { |
| 379 |
|
$locations[] = $location; |
| 380 |
|
} |
| 381 |
|
} |
| 382 |
|
|
| 383 |
|
return $locations; |
| 384 |
|
} |