1 | <?php |
||
2 | |||
3 | class AdvertSiteConfig extends DataExtension |
||
0 ignored issues
–
show
|
|||
4 | { |
||
5 | public static $db = array( |
||
6 | 'MpuAboveFoldPosition' => 'Int', |
||
7 | 'MpuBelowFoldPosition' => 'Int', |
||
8 | ); |
||
9 | |||
10 | public static $defaults = array( |
||
11 | 'MpuAboveFoldPosition' => '4', |
||
12 | 'MpuBelowFoldPosition' => '11', |
||
13 | ); |
||
14 | |||
15 | public function updateCMSFields(FieldList $fields) |
||
16 | { |
||
17 | $fields->addFieldToTab('Root.Advert', new NumericField('MpuAboveFoldPosition', |
||
18 | 'Position the list for the MPU advert above the fold')); |
||
19 | $fields->addFieldToTab('Root.Advert', new NumericField('MpuBelowFoldPosition', |
||
20 | 'Position the list for the MPU advert below the fold')); |
||
21 | } |
||
22 | } |
||
23 |
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.