Completed
Pull Request — master (#8)
by Matthew
04:42
created

ElementSlideshowSlideDataExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 16
rs 10
c 0
b 0
f 0
ccs 3
cts 3
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateCMSFields() 0 4 1
1
<?php
2
3
namespace Dynamic\Elements\Flexslider\ORM;
4
5
use Dynamic\Elements\Flexslider\Elements\ElementSlideshow;
6
use SilverStripe\Forms\FieldList;
7
use SilverStripe\ORM\DataExtension;
8
9
class ElementSlideshowSlideDataExtension extends DataExtension
10
{
11
    /**
12
     * @var array
13
     */
14
    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...
15
        'SlideshowElement' => ElementSlideshow::class,
16
    );
17
18
    /**
19
     * @param FieldList $fields
20
     */
21 1
    public function updateCMSFields(FieldList $fields)
22
    {
23 1
        $fields->removeByName(array(
24 1
            'SlideshowElementID',
25
        ));
26
    }
27
}
28