Completed
Push — master ( ee8148...8a510c )
by Bram
01:38
created

AddDiscountExtension::updateForm()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
c 0
b 0
f 0
rs 9.9666
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Broarm\EventTickets;
4
5
use Extension;
6
7
/**
8
 * Class AddDiscountExtension
9
 * @package Broarm\EventTickets
10
 * @property ReservationForm $owner
11
 */
12
class AddDiscountExtension extends Extension
13
{
14
    public function updateForm()
15
    {
16
17
        $fields = $this->owner->Fields();
18
        $fields->add(
19
            $field = DiscountField::create('CouponCode', _t('DiscountForm.COUPON_CODE', 'Coupon code'))
20
        );
21
        $field->setForm($this->owner);
22
    }
23
}
24