MemberDataExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A updateCMSFields() 0 3 1
1
<?php
2
3
namespace Dynamic\Foxy\Orders\Extension;
4
5
use Dynamic\Foxy\Orders\Model\Order;
6
use SilverStripe\Forms\FieldList;
7
use SilverStripe\Forms\TextField;
8
use SilverStripe\ORM\DataExtension;
9
10
class MemberDataExtension extends DataExtension
11
{
12
    /**
13
     * @var array
14
     */
15
    private static $has_many = [
0 ignored issues
show
introduced by
The private property $has_many is not used, and could be removed.
Loading history...
16
        'Orders' => Order::class,
17
    ];
18
19
    /**
20
     * @param FieldList $fields
21
     */
22
    public function updateCMSFields(FieldList $fields)
23
    {
24
        $fields->replaceField('Customer_ID', TextField::create('Customer_ID')->performReadonlyTransformation());
25
    }
26
}
27