Skip to content

Commit

Permalink
introduced requested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
engcom-Charlie committed Jan 21, 2021
1 parent 2900e74 commit f11d277
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions app/code/Magento/Cms/Model/Page/DataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,9 @@ private function getCurrentPage(): PageInterface
return $this->pageFactory->create();
}
$this->dataPersistor->clear('cms_page');
$page = $this->pageFactory->create()
->setData($data);

return $page;
return $this->pageFactory->create()
->setData($data);
}

/**
Expand Down Expand Up @@ -217,17 +216,14 @@ public function getMeta()
$page = null;
try {
$page = $this->pageRepository->getById($this->getPageId());
} catch (LocalizedException $e) {
$this->logger->error($e->getMessage());
}

if ($page) {
if ($page->getCustomLayoutUpdateXml() || $page->getLayoutUpdateXml()) {
$options[] = ['label' => 'Use existing layout update XML', 'value' => '_existing_'];
}
foreach ($this->customLayoutManager->fetchAvailableFiles($page) as $layoutFile) {
$options[] = ['label' => $layoutFile, 'value' => $layoutFile];
}
} catch (LocalizedException $e) {
$this->logger->error($e->getMessage());
}

$customLayoutMeta = [
Expand Down

0 comments on commit f11d277

Please sign in to comment.