Index.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Checkout\Controller\Cart;
  8. use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
  9. class Index extends \Magento\Checkout\Controller\Cart implements HttpGetActionInterface
  10. {
  11. /**
  12. * @var \Magento\Framework\View\Result\PageFactory
  13. */
  14. protected $resultPageFactory;
  15. /**
  16. * @param \Magento\Framework\App\Action\Context $context
  17. * @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
  18. * @param \Magento\Checkout\Model\Session $checkoutSession
  19. * @param \Magento\Store\Model\StoreManagerInterface $storeManager
  20. * @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator
  21. * @param \Magento\Checkout\Model\Cart $cart
  22. * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
  23. * @codeCoverageIgnore
  24. */
  25. public function __construct(
  26. \Magento\Framework\App\Action\Context $context,
  27. \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
  28. \Magento\Checkout\Model\Session $checkoutSession,
  29. \Magento\Store\Model\StoreManagerInterface $storeManager,
  30. \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator,
  31. \Magento\Checkout\Model\Cart $cart,
  32. \Magento\Framework\View\Result\PageFactory $resultPageFactory
  33. ) {
  34. parent::__construct(
  35. $context,
  36. $scopeConfig,
  37. $checkoutSession,
  38. $storeManager,
  39. $formKeyValidator,
  40. $cart
  41. );
  42. $this->resultPageFactory = $resultPageFactory;
  43. }
  44. /**
  45. * Shopping cart display action
  46. *
  47. * @return \Magento\Framework\View\Result\Page
  48. */
  49. public function execute()
  50. {
  51. $resultPage = $this->resultPageFactory->create();
  52. $resultPage->getConfig()->getTitle()->set(__('Shopping Cart'));
  53. return $resultPage;
  54. }
  55. }