Code Duplication    Length = 17-23 lines in 2 locations

module/Cv/src/Cv/Form/SearchForm.php 1 location

@@ 21-37 (lines=17) @@
18
19
    protected $viewPartial = 'cv/form/search.phtml';
20
21
    public function init()
22
    {
23
        $this->setName('cv-list-filter');
24
        $this->setAttributes([
25
            'id' => 'cv-list-filter',
26
            'data-handle-by' => 'native',
27
        ]);
28
29
        $this->add([
30
            'type' => $this->fieldset,
31
            'options' => [
32
                'use_as_base_fieldset' => false
33
            ]
34
        ]);
35
36
        
37
    }
38
39
    public function setViewPartial($partial)
40
    {

module/Jobs/src/Jobs/Form/ListFilter.php 1 location

@@ 55-77 (lines=23) @@
52
        return $this->viewPartial;
53
    }
54
55
    public function init()
56
    {
57
        $this->setName('jobs-list-filter');
58
        $this->setAttributes(
59
            [
60
                'id' => 'jobs-list-filter',
61
                'data-handle-by' => 'native'
62
            ]
63
        );
64
65
        $this->add(
66
            [
67
                'type'    => $this->fieldset,
68
                'options' => ['use_as_base_fieldset' => false]
69
            ]
70
        );
71
72
        $this->add(
73
            [
74
                'type' => 'Core/ListFilterButtons'
75
            ]
76
        );
77
    }
78
}
79