PdfAction.php 672 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Sales\Ui\Component\Control;
  7. use Magento\Ui\Component\Control\Action;
  8. /**
  9. * Class PdfAction
  10. */
  11. class PdfAction extends Action
  12. {
  13. /**
  14. * Prepare
  15. *
  16. * @return void
  17. */
  18. public function prepare()
  19. {
  20. $config = $this->getConfiguration();
  21. $context = $this->getContext();
  22. $config['url'] = $context->getUrl(
  23. $config['pdfAction'],
  24. ['order_id' => $context->getRequestParam('order_id')]
  25. );
  26. $this->setData('config', (array)$config);
  27. parent::prepare();
  28. }
  29. }