Proyectos de Subversion LeadersLinked - Services

Rev

Rev 195 | Ir a la última revisión | | 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 Laminas\Db\Adapter\AdapterInterface;
9
use Laminas\Log\LoggerInterface;
10
use LeadersLinked\Mapper\CompanySizeMapper;
11
use LeadersLinked\Mapper\IndustryMapper;
12
use LeadersLinked\Model\Feed;
13
use LeadersLinked\Model\AbuseReport;
14
 
15
class CreateForm extends Form
16
{
17
 
18
    /**
19
     *
20
     */
21
    public function __construct()
22
    {
23
        parent::__construct();
24
        $this->setInputFilter(new CreateFilter());
25
 
26
        $this->add([
27
            'name' => 'reason',
28
            'type' => \Laminas\Form\Element\Select::class,
29
            'options' => [
30
                'value_options' =>  [
31
                    AbuseReport::REASON_ADDICTION => 'LABEL_ABUSE_REPORT_REASON_ADDICTION',
32
                    AbuseReport::REASON_DISCRIMINATION => 'LABEL_ABUSE_REPORT_REASON_DISCRIMINATION',
33
                    AbuseReport::REASON_OFENSIVE => 'LABEL_ABUSE_REPORT_REASON_OFENSIVE',
34
                    AbuseReport::REASON_SEXUALITY => 'LABEL_ABUSE_REPORT_REASON_SEXUALITY',
35
                    AbuseReport::REASON_TERRORISM => 'LABEL_ABUSE_REPORTREASON_TERRORISM',
36
                    AbuseReport::READON_OTHER => 'LABEL_ABUSE_REPORT_ READON_OTHER',
37
                ],
38
            ],
39
            'attributes' => [
40
                'id' => 'reason',
41
            ]
42
        ]);
43
 
44
        $this->add([
45
            'name' => 'block_user',
46
            'type' => \Laminas\Form\Element\Select::class,
47
            'options' => [
48
                'value_options' =>  [
49
                    'y' => 'LABEL_YES',
50
                    'n' => 'LABEL_NO'
51
                ],
52
            ],
53
            'attributes' => [
54
                'id' => 'block_user',
55
            ]
56
        ]);
57
 
58
 
59
 
60
        $this->add([
61
            'name' => 'comment',
62
            'type' => \Laminas\Form\Element\Textarea::class,
63
            'attributes' => [
64
                'id'    => 'comment',
65
                'maxlength' => 500
66
            ]
67
        ]);
68
    }
69
}