|
1 |
| -<?php |
2 |
| -/** |
3 |
| - * Copyright © Magento, Inc. All rights reserved. |
4 |
| - * See COPYING.txt for license details. |
5 |
| - */ |
6 |
| -namespace Magento\Review\Controller\Product; |
7 |
| - |
8 |
| -use Magento\Framework\Exception\LocalizedException; |
9 |
| -use Magento\Review\Controller\Product as ProductController; |
10 |
| -use Magento\Framework\Controller\ResultFactory; |
11 |
| - |
12 |
| -class ListAjax extends ProductController |
13 |
| -{ |
14 |
| - /** |
15 |
| - * Show list of product's reviews |
16 |
| - * |
17 |
| - * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|\Magento\Framework\View\Result\Layout |
18 |
| - */ |
19 |
| - public function execute() |
20 |
| - { |
21 |
| - if (!$this->initProduct()) { |
22 |
| - /** @var \Magento\Framework\Controller\Result\Forward $resultForward */ |
23 |
| - $resultForward = $this->resultFactory->create(ResultFactory::TYPE_FORWARD); |
24 |
| - $resultForward->forward('noroute'); |
25 |
| - return $resultForward; |
26 |
| - } else { |
27 |
| - /** @var \Magento\Framework\View\Result\Layout $resultLayout */ |
28 |
| - $resultLayout = $this->resultFactory->create(ResultFactory::TYPE_LAYOUT); |
29 |
| - } |
30 |
| - |
31 |
| - return $resultLayout; |
32 |
| - } |
33 |
| -} |
| 1 | +<?php |
| 2 | +/** |
| 3 | + * Copyright © Magento, Inc. All rights reserved. |
| 4 | + * See COPYING.txt for license details. |
| 5 | + */ |
| 6 | +namespace Magento\Review\Controller\Product; |
| 7 | + |
| 8 | +use Magento\Framework\Exception\LocalizedException; |
| 9 | +use Magento\Review\Controller\Product as ProductController; |
| 10 | +use Magento\Framework\Controller\ResultFactory; |
| 11 | + |
| 12 | +class ListAjax extends ProductController |
| 13 | +{ |
| 14 | + /** |
| 15 | + * Show list of product's reviews |
| 16 | + * |
| 17 | + * @return \Magento\Framework\App\ResponseInterface|\Magento\Framework\Controller\ResultInterface|\Magento\Framework\View\Result\Layout |
| 18 | + */ |
| 19 | + public function execute() |
| 20 | + { |
| 21 | + if (!$this->initProduct()) { |
| 22 | + /** @var \Magento\Framework\Controller\Result\Forward $resultForward */ |
| 23 | + $resultForward = $this->resultFactory->create(ResultFactory::TYPE_FORWARD); |
| 24 | + $resultForward->forward('noroute'); |
| 25 | + return $resultForward; |
| 26 | + } else { |
| 27 | + /** @var \Magento\Framework\View\Result\Layout $resultLayout */ |
| 28 | + $resultLayout = $this->resultFactory->create(ResultFactory::TYPE_LAYOUT); |
| 29 | + } |
| 30 | + |
| 31 | + return $resultLayout; |
| 32 | + } |
| 33 | +} |
0 commit comments