Completed
Push — develop ( 41c7f2...c75883 )
by
unknown
08:12
created

AdminSearchForm   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
c 1
b 0
f 1
lcom 0
cbo 1
dl 0
loc 41
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B init() 0 32 1
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 Jobs\Entity\Status;
15
16
/**
17
 * Defines the an additional Select field for the job list filter used by the admin
18
 *
19
 * @package Jobs\Form
20
 */
21
class AdminSearchForm extends TextSearchForm
22
{
23
24
    protected $options = [
25
        'button_element' => 'text',
26
        'placeholder' => /*@translate*/ 'search for position or company',
27
    ];
28
29
    public function init()
30
    {
31
        parent::init();
32
33
34
        $this->add(
35
            array(
36
                'type'       => 'Jobs/StatusSelect',
37
                'options' => [
38
                    'include_all_option' => true,
39
                ],
40
                'attributes' => array(
41
                    'value' => 'all',
42
                )
43
            )
44
        );
45
46
        $this->add(
47
            array(
48
                'type' => 'Jobs/ActiveOrganizationSelect',
49
                'property' => true,
50
                'name' => 'companyId',
51
                'options' => array(
52
                    'label' => /*@translate*/ 'Companyname',
53
                ),
54
                'attributes' => array(
55
                    'data-placeholder' => /*@translate*/ 'Select hiring organization',
56
                    'class' => 'form-control',
57
                ),
58
            )
59
        );
60
    }
61
}
62