Proyectos de Subversion LeadersLinked - Services

Rev

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

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
345 www 2
declare(strict_types = 1);
1 efrain 3
namespace LeadersLinked\Form\UserProfile;
4
 
5
use Laminas\InputFilter\InputFilter;
6
 
7
class ExtendedFilter extends InputFilter
8
{
345 www 9
 
1 efrain 10
    public function __construct()
11
    {
12
        $this->add([
13
            'name' => 'description',
14
            'required' => true,
15
            'filters' => [
16
                [
345 www 17
                    'name' => \Laminas\Filter\StringTrim::class
18
                ],
19
                [
20
                    'name' => \LeadersLinked\Filter\HtmlPurify::class
21
                ],
22
                [
1 efrain 23
                    'name' => \Laminas\Filter\StripTags::class,
24
                    'options' => [
345 www 25
                        'allowTags' => [
26
                            'h1',
27
                            'h2',
28
                            'h3',
29
                            'h4',
30
                            'h5',
31
                            'h6',
32
                            'p',
33
                            'strong',
34
                            'em',
35
                            's',
36
                            'span',
37
                            'big',
38
                            'small',
39
                            'tt',
40
                            'hr',
41
                            'table',
42
                            'thead',
43
                            'tr',
44
                            'th',
45
                            'td',
46
                            'img',
47
                            'a',
48
                            'style'
49
                        ]
1 efrain 50
                    ]
345 www 51
                ]
1 efrain 52
            ],
53
            'validators' => [
54
                [
345 www 55
                    'name' => \Laminas\Validator\NotEmpty::class
56
                ]
57
            ]
1 efrain 58
        ]);
59
    }
60
}