Guest User

Untitled

a guest
Mar 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. <?php
  2. namespace UVBestellungPlugin;
  3.  
  4. class Buttons
  5. {
  6. public function beforePushButtons(
  7. MagentoBackendBlockWidgetButtonToolbarInterceptor $subject,
  8. MagentoFrameworkViewElementAbstractBlock $context,
  9. MagentoBackendBlockWidgetButtonButtonList $buttonList
  10. ) {
  11.  
  12. $this->_request = $context->getRequest();
  13. if($this->_request->getFullActionName() == 'sales_order_view'){
  14. $buttonList->add(
  15. 'Bestellschein',
  16. ['label' => __('Bestellschein'), 'onclick' => 'alert("test");', 'class' => 'reset'],
  17. -1
  18. );
  19. }
  20. }
  21. }
  22. ?>
  23.  
  24. <?php
  25. namespace UVBestellungControllerAdminhtmlOrder;
  26. class Custom extends MagentoSalesControllerAdminhtmlOrder
  27. {
  28. public function execute()
  29. {
  30. // my logic here
  31. }
  32. }
  33. ?>
Add Comment
Please, Sign In to add comment