Passed
Push — master ( 885677...7a0915 )
by Simon
08:10
created

SiteConfigExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateCMSFields() 0 3 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: simon
5
 * Date: 17-May-18
6
 * Time: 19:17
7
 */
8
9
namespace Firesphere\BootstrapMFA\Extensions;
10
11
12
use SilverStripe\Forms\CheckboxField;
13
use SilverStripe\Forms\FieldList;
14
use SilverStripe\ORM\DataExtension;
15
16
/**
17
 * Class \Firesphere\BootstrapMFA\Extensions\SiteConfigExtension
18
 *
19
 * @property \Firesphere\BootstrapMFA\Extensions\SiteConfigExtension $owner
20
 * @property boolean $ForceMFA
21
 */
22
class SiteConfigExtension extends DataExtension
23
{
24
25
    private static $db = [
0 ignored issues
show
introduced by
The private property $db is not used, and could be removed.
Loading history...
26
        'ForceMFA' => 'Boolean(false)'
27
    ];
28
29
    public function updateCMSFields(FieldList $fields)
30
    {
31
        $fields->addFieldToTab('Root.MFA', CheckboxField::create('ForceMFA', 'Enforce MFA on all users'));
32
    }
33
}