Index.php 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\InventoryAdminUi\Controller\Adminhtml\Stock;
  8. use Magento\Backend\App\Action;
  9. use Magento\Backend\Model\View\Result\Page;
  10. use Magento\Framework\Controller\ResultFactory;
  11. use Magento\Framework\Controller\ResultInterface;
  12. use Magento\Framework\App\Action\HttpGetActionInterface;
  13. /**
  14. * Index Controller
  15. */
  16. class Index extends Action implements HttpGetActionInterface
  17. {
  18. /**
  19. * @see _isAllowed()
  20. */
  21. const ADMIN_RESOURCE = 'Magento_InventoryApi::stock';
  22. /**
  23. * @inheritdoc
  24. */
  25. public function execute(): ResultInterface
  26. {
  27. /** @var Page $resultPage */
  28. $resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
  29. $resultPage->setActiveMenu('Magento_InventoryAdminUi::stock')
  30. ->addBreadcrumb(__('Sources'), __('List'));
  31. $resultPage->getConfig()->getTitle()->prepend(__('Manage Stock'));
  32. return $resultPage;
  33. }
  34. }