FoxyIntegrationObject::getCMSFields()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 9
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Dynamic\Foxy\Integrations\Model;
4
5
use Dynamic\Foxy\Model\Setting;
6
use SilverStripe\ORM\DataObject;
7
8
class FoxyIntegrationObject extends DataObject
9
{
10
    /**
11
     * @var array
12
     */
13
    private static $db = array(
0 ignored issues
show
introduced by
The private property $db is not used, and could be removed.
Loading history...
14
        'Title' => 'Varchar(150)',
15
        'URL' => 'Varchar(255)'
16
    );
17
18
    /**
19
     * @var array
20
     */
21
    private static $has_one = array(
0 ignored issues
show
introduced by
The private property $has_one is not used, and could be removed.
Loading history...
22
        'FoxySetting' => Setting::class,
23
    );
24
25
    /**
26
     * @var string
27
     */
28
    private static $singular_name = 'Foxy Integration';
0 ignored issues
show
introduced by
The private property $singular_name is not used, and could be removed.
Loading history...
29
30
    /**
31
     * @var string
32
     */
33
    private static $plural_name = 'Foxy Integrations';
0 ignored issues
show
introduced by
The private property $plural_name is not used, and could be removed.
Loading history...
34
35
    /**
36
     * @var string
37
     */
38
    private static $table_name = 'FoxyIntegrationObject';
0 ignored issues
show
introduced by
The private property $table_name is not used, and could be removed.
Loading history...
39
40
    /**
41
     * @var array
42
     */
43
    private static $summary_fields = array(
0 ignored issues
show
introduced by
The private property $summary_fields is not used, and could be removed.
Loading history...
44
        'Title',
45
        'URL'
46
    );
47
48
    /**
49
     * @return \SilverStripe\Forms\FieldList
50
     */
51
    public function getCMSFields()
52
    {
53
        $fields = parent::getCMSFields();
54
55
        $fields->removeByName([
56
            'FoxySettingID',
57
        ]);
58
59
        return $fields;
60
    }
61
}
62