Status.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Block\Adminhtml\Order;
  7. /**
  8. * Adminhtml sales order's status management block
  9. *
  10. * @api
  11. * @author Magento Core Team <core@magentocommerce.com>
  12. * @since 100.0.2
  13. */
  14. class Status extends \Magento\Backend\Block\Widget\Grid\Container
  15. {
  16. /**
  17. * Class constructor
  18. *
  19. * @return void
  20. */
  21. protected function _construct()
  22. {
  23. $this->_controller = 'adminhtml_order_status';
  24. $this->_headerText = __('Order Statuses');
  25. $this->_addButtonLabel = __('Create New Status');
  26. $this->buttonList->add(
  27. 'assign',
  28. [
  29. 'label' => __('Assign Status to State'),
  30. 'onclick' => 'setLocation(\'' . $this->getAssignUrl() . '\')',
  31. 'class' => 'add'
  32. ]
  33. );
  34. parent::_construct();
  35. }
  36. /**
  37. * Create url getter
  38. *
  39. * @return string
  40. */
  41. public function getCreateUrl()
  42. {
  43. return $this->getUrl('sales/order_status/new');
  44. }
  45. /**
  46. * Assign url getter
  47. *
  48. * @return string
  49. */
  50. public function getAssignUrl()
  51. {
  52. return $this->getUrl('sales/order_status/assign');
  53. }
  54. }