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 DailyPulseEditEmojiForm extends Form
15
{
16
 
17
    public function __construct()
18
    {
19
        parent::__construct();
20
        $this->setInputFilter(new DailyPulseEditEmojiFilter());
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
        $this->add([
33
            'name' => 'image',
34
            'type' => \Laminas\Form\Element\File::class,
35
            'attributes' => [
36
                'id' => 'image',
37
            ]
38
        ]);
39
 
40
 
41
        $this->add([
42
            'name' => 'type',
43
            'type' => \Laminas\Form\Element\Select::class,
44
            'options' => [
45
                'value_options' => [
46
                    \LeadersLinked\Model\DailyPulseEmoji::TYPE_CLIMATE_ON_YOUR_ORGANIZATION => 'LABEL_CLIMATE_ON_YOUR_ORGANIZATION',
47
                    \LeadersLinked\Model\DailyPulseEmoji::TYPE_HOW_ARE_YOU_FEEL => 'LABEL_HOW_ARE_YOU_FEEL'
48
 
49
                ],
50
            ],
51
            'attributes' => [
52
                'id' => 'type',
53
            ]
54
        ]);
55
 
56
        $this->add([
57
            'name' => 'status',
58
            'type' => \Laminas\Form\Element\Checkbox::class,
59
            'attributes' => [
60
                'id' 			=> 'status',
61
            ],
62
            'options' => [
16766 efrain 63
                'use_hidden_element' => false,
15540 efrain 64
                'unchecked_value' =>  \LeadersLinked\Model\DailyPulseEmoji::STATUS_INACTIVE,
65
                'checked_value'=> \LeadersLinked\Model\DailyPulseEmoji::STATUS_ACTIVE,
66
            ]
67
        ]);
68
 
69
 
70
        $this->add([
71
            'name' => 'order',
72
            'type' => \Laminas\Form\Element\Number::class,
73
            'attributes' => [
74
                'id'    => 'order',
75
                'step'  => 1,
76
                'min'   => 0,
77
            ]
78
        ]);
79
 
80
        $this->add([
81
            'name' => 'points',
82
            'type' => \Laminas\Form\Element\Number::class,
83
            'attributes' => [
84
                'id' 			=> 'points',
85
                'step'  => 1,
86
                'min'   => 0,
87
            ],
88
        ]);
89
 
90
    }
91
}