Group.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Backend\Block\System\Store\Delete;
  7. /**
  8. * Adminhtml store delete group block
  9. *
  10. * @author Magento Core Team <core@magentocommerce.com>
  11. */
  12. class Group extends \Magento\Backend\Block\Template
  13. {
  14. /**
  15. * {@inheritdoc}
  16. */
  17. protected function _prepareLayout()
  18. {
  19. $itemId = $this->getRequest()->getParam('group_id');
  20. $this->setTemplate('Magento_Backend::system/store/delete_group.phtml');
  21. $this->setAction($this->getUrl('adminhtml/*/deleteGroupPost', ['group_id' => $itemId]));
  22. $this->addChild(
  23. 'confirm_deletion_button',
  24. \Magento\Backend\Block\Widget\Button::class,
  25. ['label' => __('Delete Store'), 'onclick' => "deleteForm.submit()", 'class' => 'cancel']
  26. );
  27. $onClick = "setLocation('" . $this->getUrl('adminhtml/*/editGroup', ['group_id' => $itemId]) . "')";
  28. $this->addChild(
  29. 'cancel_button',
  30. \Magento\Backend\Block\Widget\Button::class,
  31. ['label' => __('Cancel'), 'onclick' => $onClick, 'class' => 'cancel']
  32. );
  33. $this->addChild(
  34. 'back_button',
  35. \Magento\Backend\Block\Widget\Button::class,
  36. ['label' => __('Back'), 'onclick' => $onClick, 'class' => 'cancel']
  37. );
  38. return parent::_prepareLayout();
  39. }
  40. }