Edit.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\EncryptionKey\Block\Adminhtml\Crypt\Key;
  7. /**
  8. * Encryption key change edit page block
  9. *
  10. * @api
  11. * @since 100.0.2
  12. */
  13. class Edit extends \Magento\Backend\Block\Widget\Form\Container
  14. {
  15. /**
  16. * Block module name
  17. *
  18. * @var string|null
  19. */
  20. protected $_blockGroup = null;
  21. /**
  22. * Controller name
  23. *
  24. * @var string
  25. */
  26. protected $_controller = 'crypt_key';
  27. /**
  28. * Instantiate save button
  29. *
  30. * @return void
  31. */
  32. protected function _construct()
  33. {
  34. \Magento\Framework\DataObject::__construct();
  35. $this->buttonList->add(
  36. 'save',
  37. [
  38. 'label' => __('Change Encryption Key'),
  39. 'class' => 'save primary save-encryption-key',
  40. 'data_attribute' => [
  41. 'mage-init' => ['button' => ['event' => 'save', 'target' => '#edit_form']],
  42. ]
  43. ],
  44. 1
  45. );
  46. }
  47. /**
  48. * Header text getter
  49. *
  50. * @return \Magento\Framework\Phrase
  51. */
  52. public function getHeaderText()
  53. {
  54. return __('Encryption Key');
  55. }
  56. }