1 | <?php |
||
3 | class EcommerceDashboardPanel extends DashboardPanel |
||
|
|||
4 | { |
||
5 | |||
6 | |||
7 | /** |
||
8 | * @var bool Show the configure form after creating. Used for panels that require |
||
9 | * configuration in order to show data |
||
10 | */ |
||
11 | private static $configure_on_create = true; |
||
12 | |||
13 | |||
14 | private static $db = array( |
||
15 | 'DaysBack' => 'Int' |
||
16 | ); |
||
17 | |||
18 | private static $defaults = array( |
||
19 | 'DaysBack' => 7 |
||
20 | ); |
||
21 | |||
22 | |||
23 | private static $icon = "ecommerce_dashboard/images/icons"; |
||
24 | |||
25 | public function getLabel() |
||
29 | |||
30 | public function getTitle() |
||
38 | |||
39 | public function getLabelPrefix() |
||
43 | |||
44 | public function getConfiguration() |
||
52 | |||
53 | /** |
||
54 | * |
||
55 | * |
||
56 | * @return DataList |
||
57 | */ |
||
58 | protected function openOrders($numberOfDaysBack = 7) |
||
69 | |||
70 | /** |
||
71 | * |
||
72 | * |
||
73 | * @return DataList |
||
74 | */ |
||
75 | protected function submittedOrders($numberOfDaysBack = 0) |
||
84 | |||
85 | /** |
||
86 | * |
||
87 | * |
||
88 | * @return DataList |
||
89 | */ |
||
90 | protected function archivedOrders($numberOfDaysBack = 0) |
||
102 | |||
103 | |||
104 | |||
105 | /** |
||
106 | * An accessor to the Dashboard controller |
||
107 | * |
||
108 | * @return Dashboard |
||
109 | */ |
||
110 | public function getDashboard() |
||
114 | |||
115 | /** |
||
116 | * |
||
117 | * |
||
118 | * @var array |
||
119 | */ |
||
120 | private static $_excluded_members_array = array(); |
||
121 | |||
122 | /** |
||
123 | * |
||
124 | * |
||
125 | * @return array array of member IDs |
||
126 | */ |
||
127 | protected function excludedMembersArray() |
||
147 | |||
148 | /** |
||
149 | * |
||
150 | * |
||
151 | * @return string where statement for orders that have been submitted. |
||
152 | */ |
||
153 | protected function daysBackWhereStatement($daysBack = 0) |
||
160 | |||
161 | /** |
||
162 | * @var int The "weight" of the dashboard panel when listed in the available panels. |
||
163 | * Higher is lower in the list. |
||
164 | */ |
||
165 | //private static $priority = 100; |
||
166 | |||
167 | |||
168 | |||
169 | /** |
||
170 | * @var string The name of the template used for the contents of this panel. |
||
171 | */ |
||
172 | //protected $template; |
||
173 | |||
174 | public function maxOrdersForLoop() |
||
178 | |||
179 | |||
180 | /** |
||
181 | * Allows the panel to be added |
||
182 | * |
||
183 | * @return string |
||
184 | */ |
||
185 | public function registered() |
||
196 | |||
197 | protected function CalculatedDaysBack() |
||
201 | } |
||
202 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.