DelegateInformation   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 62
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 62
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getInputFilterSpecification() 0 3 1
B init() 0 44 1
1
<?php
2
3
namespace ConferenceTools\Tickets\Form\Fieldset;
4
5
use Zend\Form\Element\Text;
6
use Zend\Form\Element\Textarea;
7
use Zend\Form\Fieldset;
8
use Zend\InputFilter\InputFilterProviderInterface;
9
10
class DelegateInformation extends Fieldset implements InputFilterProviderInterface
11
{
12
    /**
13
     * {@inheritDoc}
14
     */
15
    public function init()
16
    {
17
        $this->add([
18
            'type' => Text::class,
19
            'name' => 'firstname',
20
            'options' => [
21
                'label' => 'First name'
22
            ],
23
        ]);
24
        $this->add([
25
            'type' => Text::class,
26
            'name' => 'lastname',
27
            'options' => [
28
                'label' => 'Family name'
29
            ],
30
        ]);
31
        $this->add([
32
            'type' => Text::class,
33
            'name' => 'email',
34
            'options' => [
35
                'label' => 'Email',
36
                'help-block' => 'We\'ll add this email to our attendees mailing list to keep you up to date'
37
            ],
38
        ]);
39
        $this->add([
40
            'type' => Text::class,
41
            'name' => 'company',
42
            'options' => [
43
                'label' => 'Company'
44
            ],
45
        ]);
46
        $this->add([
47
            'type' => Text::class,
48
            'name' => 'twitter',
49
            'options' => [
50
                'label' => 'Twitter handle'
51
            ],
52
        ]);
53
        $this->add([
54
            'type' => Textarea::class,
55
            'name' => 'requirements',
56
            'options' => [
57
                'label' => 'Any Requirements',
58
                'help-block' => 'eg dietary needs, accessibility needs etc'
59
            ],
60
        ]);
61
    }
62
63
    /**
64
     * Should return an array specification compatible with
65
     * {@link Zend\InputFilter\Factory::createInputFilter()}.
66
     *
67
     * @return array
68
     */
69
    public function getInputFilterSpecification()
70
    {
71
        return [];
72
    }
73
}