1 | <?php |
||
4 | class CountryPrice_SiteTreeExtensions extends SiteTreeExtension |
||
|
|||
5 | { |
||
6 | private static $has_many = array( |
||
7 | 'CountryPriceTranslations' => 'CountryPrice_Translation' |
||
8 | ); |
||
9 | |||
10 | private static $field_labels = array( |
||
11 | 'CountryPriceTranslations' => 'Translations' |
||
12 | ); |
||
13 | |||
14 | /** |
||
15 | * Update Fields |
||
16 | * @return FieldList |
||
17 | */ |
||
18 | public function updateCMSFields(FieldList $fields) |
||
31 | |||
32 | private static $_translations = array(); |
||
33 | |||
34 | /** |
||
35 | * |
||
36 | * @return DataList |
||
37 | */ |
||
38 | public function AvailableTranslationLinks() |
||
43 | |||
44 | /** |
||
45 | * |
||
46 | * @return CountryPrice_Translation | null |
||
47 | */ |
||
48 | public function CanonicalObject() |
||
62 | |||
63 | public function loadTranslatedValues($countryID = 0, $variableOrMethod = '') |
||
110 | |||
111 | /** |
||
112 | * cache for all translations ... |
||
113 | * @var [type] |
||
114 | */ |
||
115 | private $_translations_all_cache = []; |
||
116 | |||
117 | /** |
||
118 | * @var int $countryID |
||
119 | * |
||
120 | * @return CountryPrice_Translation | null |
||
121 | */ |
||
122 | public function getRealEcommerceTranslation($countryID) |
||
136 | |||
137 | /** |
||
138 | * cache for all translations ... |
||
139 | * @var [type] |
||
140 | */ |
||
141 | private $_translations_all_cache = []; |
||
142 | |||
143 | /** |
||
144 | * @var int $countryID |
||
145 | * |
||
146 | * @return CountryPrice_Translation | null |
||
147 | */ |
||
148 | public function getEcommerceTranslation($countryID) |
||
163 | |||
164 | /** |
||
165 | * @var int $countryID |
||
166 | * |
||
167 | * @return bool |
||
168 | */ |
||
169 | public function thisPageHasTranslation($countryID) |
||
173 | |||
174 | |||
175 | } |
||
176 |
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.