Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Index.php
Go to the documentation of this file.
1 <?php
9 
10 use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
11 
13 {
17  protected $resultPageFactory;
18 
29  public function __construct(
30  \Magento\Framework\App\Action\Context $context,
31  \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
32  \Magento\Checkout\Model\Session $checkoutSession,
34  \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator,
35  \Magento\Checkout\Model\Cart $cart,
36  \Magento\Framework\View\Result\PageFactory $resultPageFactory
37  ) {
38  parent::__construct(
39  $context,
40  $scopeConfig,
41  $checkoutSession,
43  $formKeyValidator,
44  $cart
45  );
46  $this->resultPageFactory = $resultPageFactory;
47  }
48 
54  public function execute()
55  {
56  $resultPage = $this->resultPageFactory->create();
57  $resultPage->getConfig()->getTitle()->set(__('Shopping Cart'));
58  return $resultPage;
59  }
60 }
$storeManager
__()
Definition: __.php:13
__construct(\Magento\Framework\App\Action\Context $context, \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Checkout\Model\Session $checkoutSession, \Magento\Store\Model\StoreManagerInterface $storeManager, \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator, \Magento\Checkout\Model\Cart $cart, \Magento\Framework\View\Result\PageFactory $resultPageFactory)
Definition: Index.php:29