Issues (80)

code/AdvertSiteConfig.php (1 issue)

1
<?php
2
3
class AdvertSiteConfig extends DataExtension
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
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