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

SiteConfigExtension::updateCMSFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
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
}