Order.php 974 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Block\Adminhtml;
  7. /**
  8. * Adminhtml sales orders block
  9. *
  10. * @author Magento Core Team <core@magentocommerce.com>
  11. */
  12. class Order extends \Magento\Backend\Block\Widget\Grid\Container
  13. {
  14. /**
  15. * Constructor
  16. *
  17. * @return void
  18. */
  19. protected function _construct()
  20. {
  21. $this->_controller = 'adminhtml_order';
  22. $this->_blockGroup = 'Magento_Sales';
  23. $this->_headerText = __('Orders');
  24. $this->_addButtonLabel = __('Create New Order');
  25. parent::_construct();
  26. if (!$this->_authorization->isAllowed('Magento_Sales::create')) {
  27. $this->buttonList->remove('add');
  28. }
  29. }
  30. /**
  31. * Retrieve url for order creation
  32. *
  33. * @return string
  34. */
  35. public function getCreateUrl()
  36. {
  37. return $this->getUrl('sales/order_create/start');
  38. }
  39. }