Completed
Pull Request — master (#62)
by Jason
15:39
created

DynamicBlocksSlideImageDataExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateCMSFields() 0 6 1
1
<?php
2
3
namespace Dynamic\DynamicBlocks\ORM;
4
5
use Dynamic\DynamicBlocks\Block\SlideshowBlock;
6
use SilverStripe\Forms\FieldList;
7
use SilverStripe\ORM\DataExtension;
8
9
class DynamicBlocksSlideImageDataExtension extends DataExtension
10
{
11
    /**
12
     * @var array
13
     */
14
    private static $has_one = array(
15 1
        'SlideshowBlock' => SlideshowBlock::class,
16
    );
17 1
18 1
    /**
19 1
     * @param FieldList $fields
20 1
     */
21
    public function updateCMSFields(FieldList $fields)
22
    {
23
        $fields->removeByName(array(
24
            'SlideshowBlockID',
25
        ));
26
    }
27
}