Completed
Push — develop ( 6abf52...f3539b )
by
unknown
14:14
created

TemplateLabelQualifications::getHydrator()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 8
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 8
loc 8
rs 9.4286
cc 2
eloc 5
nc 2
nop 0
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @copyright (c) 2013-2015 Cross Solution (http://cross-solution.de)
7
 * @license   MIT
8
 * @author    [email protected]
9
 */
10
11
namespace Jobs\Form;
12
13
use Core\Form\Form;
14
use Zend\InputFilter\InputFilterProviderInterface;
15
use Jobs\Form\Hydrator\TemplateLabelHydrator;
16
17
/**
18
 * Defines the label of the field "qualification" of a job opening template
19
 *
20
 * @package Jobs\Form
21
 */
22 View Code Duplication
class TemplateLabelQualifications extends Form implements InputFilterProviderInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
23
{
24
25
    public function getHydrator()
26
    {
27
        if (!$this->hydrator) {
28
            $hydrator = new TemplateLabelHydrator();
29
            $this->setHydrator($hydrator);
30
        }
31
        return $this->hydrator;
32
    }
33
34
    public function init()
35
    {
36
        $this->setName('jobs-form-label-qualifications');
37
        $this->setAttributes(
38
            array(
39
            'id' => 'jobs-form-label-qualifications',
40
            'data-handle-by' => 'yk-form'
41
            )
42
        );
43
44
        $this->add(
45
            [
46
                'type' => 'Text',
47
                'name' => 'description-label-qualifications',
48
                'options' => [
49
                    'use_as_base_fieldset' => true,
50
                ]
51
            ]
52
        );
53
    }
54
55
    public function getInputFilterSpecification()
56
    {
57
        return array(
58
            'description-label-qualifications' => array(
59
                'filters' => array(
60
                    array(
61
                        'name' => 'Core\XssFilter'
62
                    )
63
                )
64
            )
65
       );
66
    }
67
}
68