Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
1 | <?php |
||
9 | function updateCMSFields(FieldList $fields){ |
||
10 | $footerTabName = 'Root.'._t('SiteConfig.FOOTER', 'Footer'); |
||
11 | $fields->addFieldToTab($footerTabName, $h1=new HTMLEditorField('FooterText', _t('SiteConfig.FOOTER_TEXT', "Text to display in the footer"))); |
||
12 | $options1 = singleton('SiteConfig')->dbObject('ColumnStart')->EnumValues(); |
||
13 | $options2 = singleton('SiteConfig')->dbObject('ColumnWidth')->EnumValues(); |
||
14 | $columnStartField = new DropdownField('ColumnStart',_t('SiteConfig.FOOTER_TEXT_START_COLUMN','Which column (of four) should the footer text start in',$options1)); |
||
15 | $columnWidthField = new DropdownField('ColumnStart',_t('SiteConfig.FOOTER_TEXT_WIDTH_COLUMN','How many, of four columns, should the footer text take up',$options2)); |
||
16 | //$fields->addFieldToTab("Root.Footer", $columnStartField); |
||
17 | //$fields->addFieldToTab("Root.Footer", $h1=new HTMLEditorField('FooterText', _t('SiteConfig.FOOTER_TEXT', "Text to display in the footer"))); |
||
18 | $h1->setRows(6); |
||
19 | } |
||
20 | } |
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.