Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SaveAndApplyButton.php
Go to the documentation of this file.
1 <?php
8 
10 
12 {
17  public function getButtonData()
18  {
19  $data = [];
20  if ($this->canRender('save_apply')) {
21  $data = [
22  'label' => __('Save and Apply'),
23  'class' => 'save',
24  'on_click' => '',
25  'sort_order' => 80,
26  'data_attribute' => [
27  'mage-init' => [
28  'Magento_Ui/js/form/button-adapter' => [
29  'actions' => [
30  [
31  'targetName' => 'catalog_rule_form.catalog_rule_form',
32  'actionName' => 'save',
33  'params' => [
34  true,
35  ['auto_apply' => 1],
36  ]
37  ]
38  ]
39  ]
40  ],
41 
42  ]
43  ];
44  }
45  return $data;
46  }
47 }
__()
Definition: __.php:13