CancelButton.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * Copyright © Magento, Inc. All rights reserved.
  5. * See COPYING.txt for license details.
  6. */
  7. namespace Magento\Customer\Block\Adminhtml\Edit\Address;
  8. use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
  9. use Magento\Customer\Block\Adminhtml\Edit\GenericButton;
  10. /**
  11. * Class CancelButton
  12. */
  13. class CancelButton extends GenericButton implements ButtonProviderInterface
  14. {
  15. /**
  16. * @inheritdoc
  17. *
  18. * @return array
  19. */
  20. public function getButtonData()
  21. {
  22. return [
  23. 'label' => __('Cancel'),
  24. 'on_click' => '',
  25. 'data_attribute' => [
  26. 'mage-init' => [
  27. 'Magento_Ui/js/form/button-adapter' => [
  28. 'actions' => [
  29. [
  30. 'targetName' => 'customer_form.areas.address.address.customer_address_update_modal',
  31. 'actionName' => 'closeModal'
  32. ],
  33. ],
  34. ],
  35. ],
  36. ],
  37. 'sort_order' => 20
  38. ];
  39. }
  40. }