Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev Autor Línea Nro. Línea
15540 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form\DailyPulse;
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
 
13
 
14
class DailyPulseAddEmojiForm extends Form
15
{
16
 
17
    public function __construct()
18
    {
19
        parent::__construct();
20
        $this->setInputFilter(new DailyPulseAddEmojiFilter());
21
 
22
 
23
        $this->add([
24
            'name' => 'name',
25
            'type' => \Laminas\Form\Element\Text::class,
26
            'attributes' => [
27
                'maxlength' 	=> 128,
28
                'id' 			=> 'name',
29
            ]
30
        ]);
31
 
32
 
33
        $this->add([
34
            'name' => 'image',
35
            'type' => \Laminas\Form\Element\File::class,
36
            'attributes' => [
37
                'id' => 'image',
38
            ]
39
        ]);
40
 
41
 
42
 
43
        $this->add([
44
            'name' => 'type',
45
            'type' => \Laminas\Form\Element\Select::class,
46
            'options' => [
47
                'value_options' => [
48
                    \LeadersLinked\Model\DailyPulseEmoji::TYPE_CLIMATE_ON_YOUR_ORGANIZATION => 'LABEL_CLIMATE_ON_YOUR_ORGANIZATION',
49
                    \LeadersLinked\Model\DailyPulseEmoji::TYPE_HOW_ARE_YOU_FEEL => 'LABEL_HOW_ARE_YOU_FEEL'
50
 
51
                ],
52
            ],
53
            'attributes' => [
54
                'id' => 'type',
55
            ]
56
        ]);
57
 
58
        $this->add([
59
            'name' => 'status',
60
            'type' => \Laminas\Form\Element\Checkbox::class,
61
            'attributes' => [
62
                'id' 			=> 'status',
63
            ],
64
            'options' => [
16766 efrain 65
                'use_hidden_element' => false,
15540 efrain 66
                'unchecked_value' =>  \LeadersLinked\Model\DailyPulseEmoji::STATUS_INACTIVE,
67
                'checked_value'=> \LeadersLinked\Model\DailyPulseEmoji::STATUS_ACTIVE,
68
            ]
69
        ]);
70
 
71
 
72
 
73
 
74
        $this->add([
75
            'name' => 'order',
76
            'type' => \Laminas\Form\Element\Number::class,
77
            'attributes' => [
78
                'id'    => 'order',
79
                'step'  => 1,
80
                'min'   => 0,
81
            ]
82
        ]);
83
 
84
        $this->add([
85
            'name' => 'points',
86
            'type' => \Laminas\Form\Element\Number::class,
87
            'attributes' => [
88
                'id' 			=> 'points',
89
                'step'  => 1,
90
                'min'   => 0,
91
            ],
92
        ]);
93
 
94
    }
95
}