Proyectos de Subversion LeadersLinked - Services

Rev

Rev 192 | Ir a la última revisión | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
192 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form\AbuseReport;
6
 
7
use Laminas\Form\Form;
8
use LeadersLinked\Model\AbuseReport;
9
 
10
class CreateForm extends Form
11
{
12
 
13
    /**
14
     *
15
     */
16
    public function __construct()
17
    {
18
        parent::__construct();
19
        $this->setInputFilter(new CreateFilter());
20
 
21
        $this->add([
22
            'name' => 'reason',
23
            'type' => \Laminas\Form\Element\Select::class,
24
            'options' => [
25
                'value_options' =>  [
26
                    AbuseReport::REASON_ADDICTION => 'LABEL_ABUSE_REPORT_REASON_ADDICTION',
27
                    AbuseReport::REASON_DISCRIMINATION => 'LABEL_ABUSE_REPORT_REASON_DISCRIMINATION',
28
                    AbuseReport::REASON_OFENSIVE => 'LABEL_ABUSE_REPORT_REASON_OFENSIVE',
29
                    AbuseReport::REASON_SEXUALITY => 'LABEL_ABUSE_REPORT_REASON_SEXUALITY',
30
                    AbuseReport::REASON_TERRORISM => 'LABEL_ABUSE_REPORTREASON_TERRORISM',
31
                    AbuseReport::READON_OTHER => 'LABEL_ABUSE_REPORT_ READON_OTHER',
32
                ],
33
            ],
34
            'attributes' => [
35
                'id' => 'reason',
36
            ]
37
        ]);
38
 
39
        $this->add([
40
            'name' => 'block_user',
41
            'type' => \Laminas\Form\Element\Select::class,
42
            'options' => [
43
                'value_options' =>  [
44
                    'y' => 'LABEL_YES',
45
                    'n' => 'LABEL_NO'
46
                ],
47
            ],
48
            'attributes' => [
49
                'id' => 'block_user',
50
            ]
51
        ]);
52
 
53
 
54
 
55
        $this->add([
56
            'name' => 'comment',
57
            'type' => \Laminas\Form\Element\Textarea::class,
58
            'attributes' => [
59
                'id'    => 'comment',
60
                'maxlength' => 500
61
            ]
62
        ]);
63
    }
64
}