1 | <?php |
||
4 | class SecondHandProductGroup extends ProductGroup |
||
|
|||
5 | { |
||
6 | |||
7 | private static $db = array( |
||
8 | 'RootParent' => 'Boolean' |
||
9 | ); |
||
10 | |||
11 | private static $allowed_children = array( |
||
12 | 'SecondHandProductGroup', |
||
13 | 'SecondHandProduct' |
||
14 | ); |
||
15 | |||
16 | private static $icon = 'ecommerce_second_hand_product/images/treeicons/SecondHandProductGroup'; |
||
17 | |||
18 | /** |
||
19 | * Standard SS variable. |
||
20 | */ |
||
21 | private static $singular_name = 'Second Hand Product Holder'; |
||
22 | public function i18n_singular_name() |
||
26 | |||
27 | /** |
||
28 | * Standard SS variable. |
||
29 | */ |
||
30 | private static $plural_name = 'Second Hand Product Holders'; |
||
31 | public function i18n_plural_name() |
||
35 | |||
36 | /** |
||
37 | * Standard SS variable. |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | private static $description = 'A product category page specifically for second had products'; |
||
42 | |||
43 | public function getCMSFields() { |
||
54 | |||
55 | /** |
||
56 | * Event handler called before writing to the database. |
||
57 | */ |
||
58 | public function onBeforeWrite() |
||
78 | |||
79 | /** |
||
80 | * Level is within SiteTree hierarchy |
||
81 | * @return boolean |
||
82 | */ |
||
83 | protected function hasOtherSecondHandProductGroupsOnThisLevel() |
||
94 | |||
95 | /** |
||
96 | * @return SecondHandProductGroup |
||
97 | */ |
||
98 | function BestRootParentPage() |
||
110 | |||
111 | /** |
||
112 | * Returns the class we are working with. |
||
113 | * |
||
114 | * @return string |
||
115 | */ |
||
116 | protected function getBuyableClassName() |
||
120 | |||
121 | } |
||
122 | |||
175 |
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.