1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\CatalogRule\Block\Adminhtml\Edit;
- use Magento\Framework\View\Element\UiComponent\Control\ButtonProviderInterface;
- class SaveAndApplyButton extends GenericButton implements ButtonProviderInterface
- {
- /**
- * @return array
- * @codeCoverageIgnore
- */
- public function getButtonData()
- {
- $data = [];
- if ($this->canRender('save_apply')) {
- $data = [
- 'label' => __('Save and Apply'),
- 'class' => 'save',
- 'on_click' => '',
- 'sort_order' => 80,
- 'data_attribute' => [
- 'mage-init' => [
- 'Magento_Ui/js/form/button-adapter' => [
- 'actions' => [
- [
- 'targetName' => 'catalog_rule_form.catalog_rule_form',
- 'actionName' => 'save',
- 'params' => [
- true,
- ['auto_apply' => 1],
- ]
- ]
- ]
- ]
- ],
- ]
- ];
- }
- return $data;
- }
- }
|