Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 16784 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
15403 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form\JobDescription;
6
 
7
use Laminas\InputFilter\InputFilter;
8
use LeadersLinked\Mapper\IndustryMapper;
9
use LeadersLinked\Mapper\CompanySizeMapper;
10
use LeadersLinked\Mapper\JobCategoryMapper;
11
use LeadersLinked\Mapper\JobDescriptionMapper;
12
 
13
class JobDescriptionFilter extends InputFilter
14
{
16787 efrain 15
    public function __construct()
15403 efrain 16
    {
17
        $this->add([
18
            'name' => 'name',
19
            'required' => true,
20
            'filters' => [
21
                ['name' => \Laminas\Filter\StripTags::class],
22
                ['name' => \Laminas\Filter\StringTrim::class],
16784 efrain 23
                ['name' => \Laminas\Filter\UpperCaseWords::class],
15403 efrain 24
            ],
25
            'validators' => [
26
                [
27
                    'name' => \Laminas\Validator\StringLength::class,
28
                    'options' => [
29
                        'encoding' => 'UTF-8',
30
                        'max' => 128,
31
                    ],
32
                ],
33
                [
34
                    'name' => \Laminas\Validator\NotEmpty::class,
35
                ],
36
            ],
37
        ]);
38
 
39
        $this->add([
40
            'name' => 'functions',
41
            'required' => true,
42
            'filters' => [
15446 efrain 43
                ['name' => \Laminas\Filter\StripTags::class],
15403 efrain 44
                ['name' => \Laminas\Filter\StringTrim::class],
45
            ],
46
            'validators' => [
47
                [
48
                    'name' => \Laminas\Validator\NotEmpty::class,
49
                ],
15446 efrain 50
                [
51
                    'name' => \Laminas\Validator\StringLength::class,
52
                    'options' => [
53
                        'encoding' => 'UTF-8',
54
                        'max' => 1024,
55
                    ],
56
                ],
15403 efrain 57
            ],
58
        ]);
59
 
60
 
61
        $this->add([
62
            'name' => 'objectives',
63
            'required' => true,
64
            'filters' => [
15446 efrain 65
                ['name' => \Laminas\Filter\StripTags::class],
15403 efrain 66
                ['name' => \Laminas\Filter\StringTrim::class],
67
            ],
68
            'validators' => [
69
                [
70
                    'name' => \Laminas\Validator\NotEmpty::class,
71
                ],
15446 efrain 72
                [
73
                    'name' => \Laminas\Validator\StringLength::class,
74
                    'options' => [
75
                        'encoding' => 'UTF-8',
76
                        'max' => 1024,
77
                    ],
78
                ],
15403 efrain 79
            ],
80
        ]);
81
 
82
        $this->add([
83
            'name' => 'status',
84
            'required' => false,
85
            'filters' => [
86
                ['name' => \Laminas\Filter\StripTags::class],
87
                ['name' => \Laminas\Filter\StringTrim::class],
88
            ],
89
            'validators' =>[
90
                [
91
                    'name' =>\Laminas\Validator\NotEmpty::class,
92
                ],
93
            ]
94
        ]);
95
 
16787 efrain 96
 
15403 efrain 97
        $this->add([
16787 efrain 98
            'name' => 'job_description_id_boss',
15403 efrain 99
            'required' => false,
16787 efrain 100
            'filters' => [
101
                ['name' => \Laminas\Filter\StripTags::class],
102
                ['name' => \Laminas\Filter\StringTrim::class],
103
            ],
104
            'validators' =>[
105
                [
106
                    'name' =>\Laminas\Validator\NotEmpty::class,
107
                ],
108
            ]
15403 efrain 109
        ]);
16787 efrain 110
 
15403 efrain 111
 
112
        $this->add([
113
            'name' => 'competencies_selected',
114
            'required' => false,
115
        ]);
116
 
117
 
118
 
119
 
120
 
121
 
122
    }
123
}