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

MapsSiteConfig   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 19
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateCMSFields() 0 8 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
}