Skip to content

Commit

Permalink
Used lazy-loaded VersionInfo data in PagerLocationToDataMapper
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz committed Jan 16, 2024
1 parent 3034ea4 commit 354187c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/Tab/Dashboard/PagerLocationToDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public function map(Pagerfanta $pager, bool $doMapVersionInfoData = false): arra

/** @var \eZ\Publish\API\Repository\Values\Content\Location $location */
foreach ($pager as $location) {
$contentInfo = $location->contentInfo;
$versionInfo = $doMapVersionInfoData ? $this->contentService->loadVersionInfo($contentInfo) : null;
$contentInfo = $location->getContentInfo();
$versionInfo = $doMapVersionInfoData ? $location->getContent()->getVersionInfo() : null;
$contentType = $location->getContentInfo()->getContentType();

$data[] = [
Expand Down

0 comments on commit 354187c

Please sign in to comment.