1 | <?php |
||
17 | class FacetedCategory extends SiteTreeExtension |
||
|
|||
18 | { |
||
19 | private static $db = array( |
||
20 | 'DisabledFacets' => 'Text', // This will be a comma-delimited list of facets that aren't used for a given category |
||
21 | ); |
||
22 | |||
23 | /** @var array - facet definition - see ShopSearch and/or docs/en/Facets.md for format */ |
||
24 | private static $facets = array(); |
||
25 | |||
26 | /** @var bool - if true there will be a tab in the cms to disable some or all defined facets */ |
||
27 | private static $show_disabled_facets_tab = true; |
||
28 | |||
29 | /** @var string - which method should we use to get the child products for FilteredProducts */ |
||
30 | private static $products_method = 'ProductsShowable'; |
||
31 | |||
32 | /** @var bool - automatically create facets for static attributes */ |
||
33 | private static $auto_facet_attributes = false; |
||
34 | |||
35 | |||
36 | /** |
||
37 | * @param FieldList $fields |
||
38 | */ |
||
39 | public function updateCMSFields(FieldList $fields) |
||
50 | |||
51 | |||
52 | /** |
||
53 | * @return Controller |
||
54 | */ |
||
55 | protected function getController() |
||
59 | |||
60 | |||
61 | /** |
||
62 | * @return array |
||
63 | */ |
||
64 | protected function getFacetSpec() |
||
69 | |||
70 | |||
71 | /** |
||
72 | * @return array |
||
73 | */ |
||
74 | protected function getFilters() |
||
87 | |||
88 | |||
89 | /** |
||
90 | * @param bool $recursive |
||
91 | * @return mixed |
||
92 | */ |
||
93 | public function FilteredProducts($recursive=true) |
||
106 | |||
107 | protected $_filteredProducts; |
||
108 | |||
109 | |||
110 | /** |
||
111 | * @return array |
||
112 | */ |
||
113 | public function getDisabledFacetsArray() |
||
120 | |||
121 | |||
122 | /** |
||
123 | * @return ArrayList |
||
124 | */ |
||
125 | public function Facets() |
||
153 | } |
||
154 |
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.