-
Notifications
You must be signed in to change notification settings - Fork 1
/
Forward.php
38 lines (33 loc) · 987 Bytes
/
Forward.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* @author Artemii Karkusha
* @copyright Copyright (c) (https://www.linkedin.com/in/artemiy-karkusha/)
*/
declare(strict_types=1);
namespace ArtemiiKarkusha\AdobeCommercePreparingToCertification\Controller\ActionsResults;
use Magento\Framework\App\Action\HttpGetActionInterface;
use Magento\Framework\App\ResponseInterface;
use Magento\Framework\Controller\ResultInterface;
use Magento\Framework\Controller\Result\ForwardFactory as ResultForwardFactory;
/**
* Controller example with result object the Forward
*/
class Forward implements HttpGetActionInterface
{
/**
* @param ResultForwardFactory $resultForwardFactory
*/
public function __construct(
private ResultForwardFactory $resultForwardFactory
) {
}
/**
* @inheritDoc
*/
public function execute(): ResultInterface
{
return $this->resultForwardFactory->create()
->setController('ActionsResults')
->forward('json');
}
}