MemberDataExtension::updateCMSFields()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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