Agreement.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\CheckoutAgreements\Controller\Adminhtml;
  7. use Magento\Backend\App\Action;
  8. use Magento\Backend\App\Action\Context;
  9. use Magento\Framework\Registry;
  10. abstract class Agreement extends Action
  11. {
  12. /**
  13. * Authorization level of a basic admin session
  14. *
  15. * @see _isAllowed()
  16. */
  17. const ADMIN_RESOURCE = 'Magento_CheckoutAgreements::checkoutagreement';
  18. /**
  19. * Core registry
  20. *
  21. * @var \Magento\Framework\Registry
  22. */
  23. protected $_coreRegistry = null;
  24. /**
  25. * @param Context $context
  26. * @param Registry $coreRegistry
  27. * @codeCoverageIgnore
  28. */
  29. public function __construct(
  30. Context $context,
  31. Registry $coreRegistry
  32. ) {
  33. $this->_coreRegistry = $coreRegistry;
  34. parent::__construct($context);
  35. }
  36. /**
  37. * Initialize action
  38. *
  39. * @return $this
  40. */
  41. protected function _initAction()
  42. {
  43. $this->_view->loadLayout();
  44. $this->_setActiveMenu(
  45. 'Magento_CheckoutAgreements::sales_checkoutagreement'
  46. )->_addBreadcrumb(
  47. __('Sales'),
  48. __('Sales')
  49. )->_addBreadcrumb(
  50. __('Checkout Conditions'),
  51. __('Checkout Terms and Conditions')
  52. );
  53. return $this;
  54. }
  55. }