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

updateCMSFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 0
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
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
}