Conditions | 1 |
Paths | 1 |
Total Lines | 23 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public function updateCMSFields(FieldList $fields) |
||
22 | { |
||
23 | $fields->removeFieldFromTab('Root', 'AvailableInCountries'); |
||
24 | $fields->removeFieldFromTab('Root', 'ExcludeFromCountries'); |
||
25 | $fields->addFieldsToTab( |
||
26 | "Root.Delivery", |
||
27 | array( |
||
28 | new GridField( |
||
29 | 'AvailableInCountries', |
||
30 | 'Included', |
||
31 | $this->owner->AvailableInCountries(), |
||
32 | GridFieldConfig_RelationEditor::create() |
||
33 | ), |
||
34 | new GridField( |
||
35 | 'ExcludeFromCountries', |
||
36 | 'Excluded', |
||
37 | $this->owner->ExcludeFromCountries(), |
||
38 | GridFieldConfig_RelationEditor::create() |
||
39 | ), |
||
40 | ) |
||
41 | ); |
||
42 | return $fields; |
||
43 | } |
||
44 | } |
||
45 |
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.