1 | <?php |
||
9 | class CheckoutPage_StepDescription extends DataObject implements EditableEcommerceObject |
||
10 | { |
||
11 | /** |
||
12 | * standard SS variable. |
||
13 | * |
||
14 | * @Var Array |
||
15 | */ |
||
16 | private static $db = array( |
||
17 | 'Heading' => 'Varchar', |
||
18 | 'Above' => 'Text', |
||
19 | 'Below' => 'Text', |
||
20 | 'Code' => 'Varchar(100)' |
||
21 | ); |
||
22 | |||
23 | /** |
||
24 | * standard SS variable. |
||
25 | * |
||
26 | * @Var Array |
||
27 | */ |
||
28 | private static $searchable_fields = array( |
||
29 | 'Heading' => 'PartialMatchFilter', |
||
30 | 'Above' => 'PartialMatchFilter', |
||
31 | 'Below' => 'PartialMatchFilter', |
||
32 | ); |
||
33 | |||
34 | /** |
||
35 | * standard SS variable. |
||
36 | * |
||
37 | * @Var Array |
||
38 | */ |
||
39 | private static $field_labels = array( |
||
40 | 'Above' => 'Above Checkout Step', |
||
41 | 'Below' => 'Below Checkout Step', |
||
42 | ); |
||
43 | |||
44 | /** |
||
45 | * standard SS variable. |
||
46 | * |
||
47 | * @Var Array |
||
48 | */ |
||
49 | private static $summary_fields = array( |
||
50 | 'ID' => 'Step Number', |
||
51 | 'Heading' => 'Heading', |
||
52 | ); |
||
53 | |||
54 | private static $indexes = [ |
||
55 | 'Code' => true |
||
56 | ]; |
||
57 | |||
58 | /** |
||
59 | * standard SS variable. |
||
60 | * |
||
61 | * @Var Array |
||
62 | */ |
||
63 | private static $casting = array( |
||
64 | 'Title' => 'Varchar', |
||
65 | ); |
||
66 | |||
67 | /** |
||
68 | * standard SS variable. |
||
69 | * |
||
70 | * @Var String |
||
71 | */ |
||
72 | private static $singular_name = 'Checkout Step Description'; |
||
73 | public function i18n_singular_name() |
||
77 | |||
78 | /** |
||
79 | * standard SS variable. |
||
80 | * |
||
81 | * @Var String |
||
82 | */ |
||
83 | private static $plural_name = 'Checkout Step Descriptions'; |
||
84 | public function i18n_plural_name() |
||
88 | |||
89 | /** |
||
90 | * Standard SS variable. |
||
91 | * |
||
92 | * @var string |
||
93 | */ |
||
94 | private static $description = 'A step within the checkout process (e.g. confirm details).'; |
||
95 | |||
96 | /** |
||
97 | * standard SS variable. |
||
98 | * |
||
99 | * @return bool |
||
100 | */ |
||
101 | private static $can_create = false; |
||
102 | |||
103 | /** |
||
104 | * these are only created programmatically |
||
105 | * standard SS method. |
||
106 | * |
||
107 | * @param Member $member |
||
108 | * |
||
109 | * @return bool |
||
110 | */ |
||
111 | public function canCreate($member = null) |
||
115 | |||
116 | /** |
||
117 | * standard SS method. |
||
118 | * |
||
119 | * @param Member $member |
||
120 | * |
||
121 | * @return bool |
||
122 | */ |
||
123 | public function canView($member = null) |
||
138 | |||
139 | /** |
||
140 | * standard SS method. |
||
141 | * |
||
142 | * @param Member $member |
||
143 | * |
||
144 | * @return bool |
||
145 | */ |
||
146 | public function canEdit($member = null) |
||
161 | |||
162 | /** |
||
163 | * standard SS method. |
||
164 | * |
||
165 | * @param Member $member |
||
166 | * |
||
167 | * @return bool |
||
168 | */ |
||
169 | public function canDelete($member = null) |
||
188 | |||
189 | /** |
||
190 | * standard SS method. |
||
191 | * |
||
192 | * @return FieldList |
||
193 | */ |
||
194 | public function getCMSFields() |
||
203 | |||
204 | /** |
||
205 | * link to edit the record. |
||
206 | * |
||
207 | * @param string | Null $action - e.g. edit |
||
208 | * |
||
209 | * @return string |
||
210 | */ |
||
211 | public function CMSEditLink($action = null) |
||
215 | |||
216 | |||
217 | /** |
||
218 | * casted variable. |
||
219 | * |
||
220 | * @return string |
||
221 | */ |
||
222 | public function Title() |
||
226 | |||
227 | public function getTitle() |
||
231 | |||
232 | /** |
||
233 | * standard SS method. |
||
234 | */ |
||
235 | public function requireDefaultRecords() |
||
263 | |||
264 | /** |
||
265 | * turns code into title (default values). |
||
266 | * |
||
267 | * @param string $code - code |
||
268 | * |
||
269 | * @return string |
||
270 | */ |
||
271 | private function getDefaultTitle($code) |
||
287 | } |
||
288 |
This check marks private properties in classes that are never used. Those properties can be removed.