1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/** |
4
|
|
|
* Nexcess.net Turpentine Extension for Magento |
5
|
|
|
* Copyright (C) 2012 Nexcess.net L.L.C. |
6
|
|
|
* |
7
|
|
|
* This program is free software; you can redistribute it and/or modify |
8
|
|
|
* it under the terms of the GNU General Public License as published by |
9
|
|
|
* the Free Software Foundation; either version 2 of the License, or |
10
|
|
|
* (at your option) any later version. |
11
|
|
|
* |
12
|
|
|
* This program is distributed in the hope that it will be useful, |
13
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
14
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15
|
|
|
* GNU General Public License for more details. |
16
|
|
|
* |
17
|
|
|
* You should have received a copy of the GNU General Public License along |
18
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc., |
19
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
20
|
|
|
*/ |
21
|
|
|
|
22
|
|
|
class Nexcessnet_Turpentine_Block_Management |
23
|
|
|
extends Mage_Adminhtml_Block_Template { |
24
|
|
|
|
25
|
|
|
public function __construct() { |
26
|
|
|
$this->_controller = 'varnish_management'; |
27
|
|
|
|
28
|
|
|
parent::__construct(); |
29
|
|
|
} |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* Get the flushAll url |
33
|
|
|
* |
34
|
|
|
* @return string |
35
|
|
|
*/ |
36
|
|
|
public function getFlushAllUrl() { |
37
|
|
|
return $this->getUrl('*/varnish_management/flushAll'); |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Get the flushPartial URL |
42
|
|
|
* |
43
|
|
|
* @return string |
44
|
|
|
*/ |
45
|
|
|
public function getFlushPartialUrl() { |
46
|
|
|
return $this->getUrl('*/varnish_management/flushPartial'); |
47
|
|
|
} |
48
|
|
|
|
49
|
|
|
/** |
50
|
|
|
* Get the flushContentType URL |
51
|
|
|
* |
52
|
|
|
* @return string |
53
|
|
|
*/ |
54
|
|
|
public function getFlushContentTypeUrl() { |
55
|
|
|
return $this->getUrl('*/varnish_management/flushContentType'); |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* Get the applyConfig URL |
60
|
|
|
* |
61
|
|
|
* @return string |
62
|
|
|
*/ |
63
|
|
|
public function getApplyConfigUrl() { |
64
|
|
|
return $this->getUrl('*/varnish_management/applyConfig'); |
65
|
|
|
} |
66
|
|
|
|
67
|
|
|
/** |
68
|
|
|
* Get the saveConfig URL |
69
|
|
|
* |
70
|
|
|
* @return string |
71
|
|
|
*/ |
72
|
|
|
public function getSaveConfigUrl() { |
73
|
|
|
return $this->getUrl('*/varnish_management/saveConfig'); |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* Get the getConfig URL |
78
|
|
|
* |
79
|
|
|
* @return string |
80
|
|
|
*/ |
81
|
|
|
public function getGetConfigUrl() { |
82
|
|
|
return $this->getUrl('*/varnish_management/getConfig'); |
83
|
|
|
} |
84
|
|
|
|
85
|
|
|
/** |
86
|
|
|
* Get the switchNavigation URL |
87
|
|
|
* |
88
|
|
|
* @param string $type |
89
|
|
|
* @return string |
90
|
|
|
*/ |
91
|
|
|
public function getSwitchNavigationUrl($type) { |
92
|
|
|
return $this->getUrl('*/varnish_management/switchNavigation', array('type' => $type)); |
93
|
|
|
} |
94
|
|
|
} |
95
|
|
|
|