@@ 22-68 (lines=47) @@ | ||
19 | * @package LizardMedia\VarnishWarmer\Block\PurgeMultiple\Form |
|
20 | * @codeCoverageIgnore |
|
21 | */ |
|
22 | class Form extends Container |
|
23 | { |
|
24 | /** |
|
25 | * @return void |
|
26 | * @SuppressWarnings(PHPMD.CamelCaseMethodName) |
|
27 | */ |
|
28 | protected function _construct(): void |
|
29 | { |
|
30 | $this->_blockGroup = 'LizardMedia_VarnishWarmer'; |
|
31 | $this->_controller = 'adminhtml_purgeMultiple_form'; |
|
32 | ||
33 | parent::_construct(); |
|
34 | ||
35 | $this->updateSaveButton(); |
|
36 | $this->removeButtons(); |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * @return Phrase |
|
41 | */ |
|
42 | public function getHeaderText(): Phrase |
|
43 | { |
|
44 | return __('Varnish: purge a group of URLs'); |
|
45 | } |
|
46 | ||
47 | /** |
|
48 | * @return void |
|
49 | */ |
|
50 | private function updateSaveButton(): void |
|
51 | { |
|
52 | $this->buttonList->update( |
|
53 | 'save', |
|
54 | 'label', |
|
55 | __('Run process') |
|
56 | ); |
|
57 | } |
|
58 | ||
59 | /** |
|
60 | * @return void |
|
61 | */ |
|
62 | private function removeButtons(): void |
|
63 | { |
|
64 | $this->buttonList->remove('delete'); |
|
65 | $this->buttonList->remove('back'); |
|
66 | $this->buttonList->remove('reset'); |
|
67 | } |
|
68 | } |
|
69 |
@@ 22-68 (lines=47) @@ | ||
19 | * @package LizardMedia\VarnishWarmer\Block\Adminhtml\Form |
|
20 | * @codeCoverageIgnore |
|
21 | */ |
|
22 | class Form extends Container |
|
23 | { |
|
24 | /** |
|
25 | * @return void |
|
26 | * @SuppressWarnings(PHPMD.CamelCaseMethodName) |
|
27 | */ |
|
28 | protected function _construct(): void |
|
29 | { |
|
30 | $this->_blockGroup = 'LizardMedia_VarnishWarmer'; |
|
31 | $this->_controller = 'adminhtml_purgeSingle_form'; |
|
32 | ||
33 | parent::_construct(); |
|
34 | ||
35 | $this->updateSaveButton(); |
|
36 | $this->removeButtons(); |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * @return Phrase |
|
41 | */ |
|
42 | public function getHeaderText(): Phrase |
|
43 | { |
|
44 | return __('Varnish: purge single URL'); |
|
45 | } |
|
46 | ||
47 | /** |
|
48 | * @return void |
|
49 | */ |
|
50 | private function updateSaveButton(): void |
|
51 | { |
|
52 | $this->buttonList->update( |
|
53 | 'save', |
|
54 | 'label', |
|
55 | __('Run process') |
|
56 | ); |
|
57 | } |
|
58 | ||
59 | /** |
|
60 | * @return void |
|
61 | */ |
|
62 | private function removeButtons(): void |
|
63 | { |
|
64 | $this->buttonList->remove('delete'); |
|
65 | $this->buttonList->remove('back'); |
|
66 | $this->buttonList->remove('reset'); |
|
67 | } |
|
68 | } |
|
69 |