From 8ca6c5ae77c4f11d3ed31248a0cdf9ee315b4528 Mon Sep 17 00:00:00 2001 From: "vadim.malesh" Date: Wed, 16 Dec 2020 14:32:35 +0200 Subject: [PATCH] removed loadedPages --- .../Magento/Cms/Model/Page/DataProvider.php | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/app/code/Magento/Cms/Model/Page/DataProvider.php b/app/code/Magento/Cms/Model/Page/DataProvider.php index 03dd2cc6866e0..a8943fdeb95bb 100644 --- a/app/code/Magento/Cms/Model/Page/DataProvider.php +++ b/app/code/Magento/Cms/Model/Page/DataProvider.php @@ -52,11 +52,6 @@ class DataProvider extends ModifierPoolDataProvider */ private $customLayoutManager; - /** - * @var null|array - */ - private $loadedPages; - /** * @var LoggerInterface */ @@ -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; } @@ -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; @@ -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();