Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Edit.php
Go to the documentation of this file.
1 <?php
7 
14 {
18  protected $_template = 'Magento_Backend::system/cache/edit.phtml';
19 
23  protected function _construct()
24  {
25  parent::_construct();
26 
27  $this->setTitle('Cache Management');
28  }
29 
33  protected function _prepareLayout()
34  {
35  $this->addChild(
36  'save_button',
37  \Magento\Backend\Block\Widget\Button::class,
38  [
39  'label' => __('Save Cache Settings'),
40  'class' => 'save',
41  'data_attribute' => [
42  'mage-init' => ['button' => ['event' => 'save', 'target' => '#config-edit-form']],
43  ]
44  ]
45  );
46  return parent::_prepareLayout();
47  }
48 
52  public function getSaveButtonHtml()
53  {
54  return $this->getChildHtml('save_button');
55  }
56 
60  public function getSaveUrl()
61  {
62  return $this->getUrl('adminhtml/*/save', ['_current' => true]);
63  }
64 
68  public function initForm()
69  {
70  $this->setChild(
71  'form',
72  $this->getLayout()->createBlock(\Magento\Backend\Block\System\Cache\Form::class)->initForm()
73  );
74  return $this;
75  }
76 
82  public function getCatalogData()
83  {
84  return [
85  'refresh_catalog_rewrites' => [
86  'label' => __('Catalog Rewrites'),
87  'buttons' => [['name' => 'refresh_catalog_rewrites', 'action' => __('Refresh')]],
88  ],
89  'clear_images_cache' => [
90  'label' => __('Images Cache'),
91  'buttons' => [['name' => 'clear_images_cache', 'action' => __('Clear')]],
92  ],
93  'rebuild_search_index' => [
94  'label' => __('Search Index'),
95  'buttons' => [['name' => 'rebuild_search_index', 'action' => __('Rebuild')]],
96  ],
97  'rebuild_inventory_stock_status' => [
98  'label' => __('Inventory Stock Status'),
99  'buttons' => [['name' => 'rebuild_inventory_stock_status', 'action' => __('Refresh')]],
100  ],
101  'rebuild_catalog_index' => [
102  'label' => __('Rebuild Catalog Index'),
103  'buttons' => [['name' => 'rebuild_catalog_index', 'action' => __('Rebuild')]],
104  ],
105  'rebuild_flat_catalog_category' => [
106  'label' => __('Rebuild Flat Catalog Category'),
107  'buttons' => [['name' => 'rebuild_flat_catalog_category', 'action' => __('Rebuild')]],
108  ],
109  'rebuild_flat_catalog_product' => [
110  'label' => __('Rebuild Flat Catalog Product'),
111  'buttons' => [['name' => 'rebuild_flat_catalog_product', 'action' => __('Rebuild')]],
112  ]
113  ];
114  }
115 }
__()
Definition: __.php:13