Index.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Backend\Controller\Adminhtml\Dashboard;
  8. use Magento\Backend\Controller\Adminhtml\Dashboard as DashboardAction;
  9. use Magento\Framework\App\Action\HttpGetActionInterface;
  10. use Magento\Framework\App\Action\HttpPostActionInterface;
  11. class Index extends DashboardAction implements HttpGetActionInterface, HttpPostActionInterface
  12. {
  13. /**
  14. * @var \Magento\Framework\View\Result\PageFactory
  15. */
  16. protected $resultPageFactory;
  17. /**
  18. * @param \Magento\Backend\App\Action\Context $context
  19. * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
  20. */
  21. public function __construct(
  22. \Magento\Backend\App\Action\Context $context,
  23. \Magento\Framework\View\Result\PageFactory $resultPageFactory
  24. ) {
  25. parent::__construct($context);
  26. $this->resultPageFactory = $resultPageFactory;
  27. }
  28. /**
  29. * @return \Magento\Backend\Model\View\Result\Page
  30. */
  31. public function execute()
  32. {
  33. /** @var \Magento\Backend\Model\View\Result\Page $resultPage */
  34. $resultPage = $this->resultPageFactory->create();
  35. $resultPage->setActiveMenu('Magento_Backend::dashboard');
  36. $resultPage->addBreadcrumb(__('Dashboard'), __('Dashboard'));
  37. $resultPage->getConfig()->getTitle()->prepend(__('Dashboard'));
  38. return $resultPage;
  39. }
  40. }