Completed
Push — master ( b49424...41df33 )
by Donata
02:56
created

MapsSiteConfig::updateCMSFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
namespace ContentBlocks;
4
5
/**
6
 * @author    Donatas Navidonskis <[email protected]>
7
 * @since     2017
8
 * @class     MapsSiteConfig
9
 *
10
 */
11
class MapsSiteConfig extends \DataExtension {
12
13
    /**
14
     * @var array
15
     * @config
16
     */
17
    private static $db = [
0 ignored issues
show
Unused Code introduced by
The property $db is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
18
        'GoogleMapsApiKey' => 'Varchar(255)',
19
    ];
20
21
    public function updateCMSFields(FieldList $fields) {
22
        $fields->addFieldToTab('Root.Main', \TextField::create(
23
            'GoogleMapsApiKey',
24
            _t('MapsSiteConfig.GOOGLE_MAPS_API_KEY', 'Google maps API key')
25
        ));
26
27
        parent::updateCMSFields($fields);
28
    }
29
}