Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
17013 efrain 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form\Habit;
6
 
7
use Laminas\Form\Form;
8
 
9
 
10
 
11
class HabitEmojiAddForm extends Form
12
{
13
 
14
    public function __construct()
15
    {
16
        parent::__construct();
17
        $this->setInputFilter(new HabitEmojiAddFilter());
18
 
19
 
20
        $this->add([
21
            'name' => 'name',
22
            'type' => \Laminas\Form\Element\Text::class,
23
            'attributes' => [
24
                'maxlength' 	=> 100,
25
                'id' 			=> 'name',
26
            ]
27
        ]);
28
 
29
 
30
        $this->add([
31
            'name' => 'image',
32
            'type' => \Laminas\Form\Element\File::class,
33
            'attributes' => [
34
                'id' => 'image',
35
            ]
36
        ]);
37
 
38
 
39
 
40
        $this->add([
41
            'name' => 'code',
42
            'type' => \Laminas\Form\Element\Text::class,
43
            'attributes' => [
44
                'maxlength' 	=> 10,
45
                'id' 			=> 'code',
46
            ]
47
        ]);
48
 
49
        $this->add([
50
            'name' => 'order',
51
            'type' => \Laminas\Form\Element\Text::class,
52
            'attributes' => [
53
                'maxlength' 	=> 2,
54
                'id' 			=> 'order',
55
            ]
56
        ]);
57
 
58
        $this->add([
59
            'name' => 'status',
60
            'type' => \Laminas\Form\Element\Checkbox::class,
61
            'attributes' => [
62
                'id' 			=> 'status',
63
            ],
64
            'options' => [
65
                'use_hidden_element' => false,
66
                'unchecked_value' =>  \LeadersLinked\Model\HabitEmoji::STATUS_INACTIVE,
67
                'checked_value'=> \LeadersLinked\Model\HabitEmoji::STATUS_ACTIVE,
68
            ]
69
        ]);
70
 
71
 
72
 
73
 
74
 
75
 
76
    }
77
}