Completed
Push — develop ( 82bf6e...62da87 )
by
unknown
08:42
created

JobDescriptionHtml   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 2
cbo 2
dl 0
loc 36
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getHydrator() 0 8 2
A init() 0 21 1
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @copyright (c) 2013 - 2016 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\JobDescriptionHydrator;
16
use Zend\Json\Expr;
17
18
/**
19
 * Defines the formular field html of a job opening.
20
 *
21
 * @package Jobs\Form
22
 * @author Mathias Gelhausen <[email protected]>
23
 * @since 0.29
24
 */
25
class JobDescriptionHtml extends Form
26
{
27
28
    public function getHydrator()
29
    {
30
        if (!$this->hydrator) {
31
            $hydrator = new JobDescriptionHydrator();
32
            $this->setHydrator($hydrator);
33
        }
34
        return $this->hydrator;
35
    }
36
37
    public function init()
38
    {
39
        $this->setName('jobs-form-html');
40
        $this->setAttributes(
41
            [
42
            'id' => 'jobs-form-html',
43
            'data-handle-by' => 'yk-form'
44
            ]
45
        );
46
47
        $this->add(
48
            [
49
            'type' => 'Textarea',
50
            'name' => 'description-html',
51
            'options' => [
52
                'placeholder' => /*@translate*/ 'Enter pure html code here',
53
            ],
54
                'attributes' => ['style' => 'width:100%;height:100%;',]
55
            ]
56
        );
57
    }
58
59
60
}
61