Skip to content

Commit

Permalink
removed loadedPages
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Charlie committed Dec 16, 2020
1 parent 912374c commit 8ca6c5a
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions app/code/Magento/Cms/Model/Page/DataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ class DataProvider extends ModifierPoolDataProvider
*/
private $customLayoutManager;

/**
* @var null|array
*/
private $loadedPages;

/**
* @var LoggerInterface
*/
Expand Down Expand Up @@ -111,7 +106,7 @@ public function __construct(
* @param array $meta
* @return array
*/
public function prepareMeta(array $meta): array
public function prepareMeta(array $meta)
{
return $meta;
}
Expand All @@ -121,7 +116,7 @@ public function prepareMeta(array $meta): array
*
* @return array
*/
public function getData(): array
public function getData()
{
if (isset($this->loadedData)) {
return $this->loadedData;
Expand Down Expand Up @@ -173,18 +168,13 @@ private function getCurrentPage(): Page
throw new LocalizedException(__('Page ID must be given'));
}

if (isset($this->loadedPages[$pageId])) {
return $this->loadedPages[$pageId];
}

$this->loadedPages[$pageId] = $this->pageRepository->getById($pageId);
return $this->loadedPages[$pageId];
return $this->pageRepository->getById($pageId);
}

/**
* @inheritDoc
*/
public function getMeta(): array
public function getMeta()
{
$meta = parent::getMeta();

Expand Down

0 comments on commit 8ca6c5a

Please sign in to comment.