diff --git a/src/Controller/Pwa.php b/src/Controller/Pwa.php index 69b26a5..b7c7e4c 100644 --- a/src/Controller/Pwa.php +++ b/src/Controller/Pwa.php @@ -55,6 +55,11 @@ class Pwa extends Action implements HttpGetActionInterface, HttpPostActionInterf */ protected $name; + /** + * @var string + */ + protected $display_mode; + /** * @var string */ @@ -131,6 +136,16 @@ public function setName(string $name): self return $this; } + /** + * @param string $display_mode + * @return Pwa + */ + public function setDisplayMode(string $display_mode): self + { + $this->display_mode = $display_mode; + return $this; + } + /** * @param string $identifier * @return Pwa @@ -176,6 +191,7 @@ public function __construct( $this->id = ''; $this->sku = ''; $this->name = ''; + $this->display_mode = ''; $this->identifier = ''; $this->description = ''; $this->catalogDefaultSortBy = ''; @@ -197,6 +213,7 @@ public function execute() $resultLayout->setSku($this->sku); $resultLayout->setName($this->name); $resultLayout->setIdentifier($this->identifier); + $resultLayout->setDisplayMode($this->display_mode); $resultLayout->setDescription($this->description); $resultLayout->setCatalogDefaultSortBy($this->catalogDefaultSortBy); try{ diff --git a/src/Controller/Router.php b/src/Controller/Router.php index b1bf0fd..678a196 100644 --- a/src/Controller/Router.php +++ b/src/Controller/Router.php @@ -349,6 +349,7 @@ protected function setResponseCategory($id, ActionInterface $action) $action->setId($category->getId() ?? ''); $action->setName($category->getName() ?? ''); + $action->setDisplayMode($category->getDisplayMode() ?? ''); $action->setDescription($category->getDescription() ?? ''); } catch (NoSuchEntityException $e) { $this->setNotFound($action); diff --git a/src/View/Result/Page.php b/src/View/Result/Page.php index 97cdd30..3baaf72 100644 --- a/src/View/Result/Page.php +++ b/src/View/Result/Page.php @@ -107,6 +107,11 @@ class Page extends ExtendedPage */ protected $name; + /** + * @var string + */ + protected $display_mode; + /** * @var string */ @@ -174,6 +179,7 @@ public function __construct( $this->id = ''; $this->sku = ''; $this->name = ''; + $this->display_mode = ''; $this->identifier = ''; $this->description = ''; $this->catalogDefaultSortBy = ''; @@ -250,6 +256,21 @@ public function getName() return $this->name; } + public function setDisplayMode(string $display_mode) + { + if($this->display_mode === '') { + $this->display_mode = $display_mode; + return $this; + } + + return ''; + } + + public function getDisplayMode() + { + return $this->display_mode; + } + public function setIdentifier(string $identifier) { if($this->identifier === '') {