Grid.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. *
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Sales\Controller\Adminhtml\Invoice\AbstractInvoice;
  8. abstract class Grid extends \Magento\Backend\App\Action
  9. {
  10. /**
  11. * Authorization level of a basic admin session
  12. *
  13. * @see _isAllowed()
  14. */
  15. const ADMIN_RESOURCE = 'Magento_Sales::sales_invoice';
  16. /**
  17. * @var \Magento\Framework\View\Result\LayoutFactory
  18. */
  19. protected $resultLayoutFactory;
  20. /**
  21. * @param \Magento\Backend\App\Action\Context $context
  22. * @param \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory
  23. */
  24. public function __construct(
  25. \Magento\Backend\App\Action\Context $context,
  26. \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory
  27. ) {
  28. parent::__construct($context);
  29. $this->resultLayoutFactory = $resultLayoutFactory;
  30. }
  31. /**
  32. * Order grid
  33. *
  34. * @return \Magento\Framework\View\Result\Layout
  35. */
  36. public function execute()
  37. {
  38. return $this->resultLayoutFactory->create();
  39. }
  40. }