CreateButton.php 876 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © 2016 Ihor Vansach (ihor@magefan.com). All rights reserved.
  4. * See LICENSE.txt for license details (http://opensource.org/licenses/osl-3.0.php).
  5. *
  6. * Glory to Ukraine! Glory to the heroes!
  7. */
  8. namespace Magefan\Blog\Block\Adminhtml\Edit;
  9. use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
  10. /**
  11. * Button "Create" in "New Category" slide-out panel of a post page
  12. */
  13. class CreateButton extends GenericButton implements ButtonProviderInterface
  14. {
  15. /**
  16. * @return array
  17. */
  18. public function getButtonData()
  19. {
  20. return [
  21. 'label' => __('Create'),
  22. 'class' => 'save primary',
  23. 'data_attribute' => [
  24. 'mage-init' => ['button' => ['event' => 'save']],
  25. 'form-role' => 'save',
  26. ],
  27. 'sort_order' => 10
  28. ];
  29. }
  30. }