Completed
Push — develop ( 7d6075...b57d28 )
by
unknown
23:57 queued 15:50
created

AdminSearchFormElementsFieldset::init()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 39
Code Lines 25

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 39
rs 8.8571
cc 1
eloc 25
nc 1
nop 0
1
<?php
2
/**
3
 * YAWIK
4
 *
5
 * @filesource
6
 * @copyright (c) 2013 - 2016 Cross Solution (http://cross-solution.de)
7
 * @license       MIT
8
 */
9
10
/** ListFilterLocationFieldset.php */
11
namespace Jobs\Form;
12
13
use Core\Form\TextSearchForm;
14
use Core\Form\TextSearchFormFieldset;
15
use Jobs\Entity\Status;
16
17
/**
18
 * Defines the an additional Select field for the job list filter used by the admin
19
 *
20
 * @package Jobs\Form
21
 */
22
class AdminSearchFormElementsFieldset extends TextSearchFormFieldset
23
{
24
25
    public function init()
26
    {
27
        $this->addTextElement(
28
             'Search',
29
             /*@translate*/ 'search for position or company'
30
        );
31
32
33
        $this->add(
34
            array(
35
                'type'       => 'Jobs/StatusSelect',
36
                'options' => [
37
                    'include_all_option' => true,
38
                    'span' => 6
39
                ],
40
                'attributes' => array(
41
                    'value' => 'all',
42
                    'style' => 'width: 100%'
43
                )
44
            )
45
        );
46
47
        $this->add(
48
            array(
49
                'type' => 'Jobs/ActiveOrganizationSelect',
50
                'property' => true,
51
                'name' => 'companyId',
52
                'options' => array(
53
                    'label' => /*@translate*/ 'Companyname',
54
                    'span' => 6,
55
                ),
56
                'attributes' => array(
57
                    'data-placeholder' => /*@translate*/ 'Select hiring organization',
58
                    'class' => 'form-control',
59
                    'style' => 'width: 100%',
60
                ),
61
            )
62
        );
63
    }
64
}
65