Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 17013 | | Comparar con el anterior | 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
class HabitEmojiEditForm extends Form
11
{
12
 
13
    public function __construct()
14
    {
15
        parent::__construct();
17014 efrain 16
        $this->setInputFilter(new HabitEmojiEditFilter());
17013 efrain 17
 
18
 
19
        $this->add([
20
            'name' => 'name',
21
            'type' => \Laminas\Form\Element\Text::class,
22
            'attributes' => [
23
                'maxlength' 	=> 100,
24
                'id' 			=> 'name',
25
            ]
26
        ]);
27
 
28
 
29
        $this->add([
30
            'name' => 'image',
31
            'type' => \Laminas\Form\Element\File::class,
32
            'attributes' => [
33
                'id' => 'image',
34
            ]
35
        ]);
36
 
37
 
38
 
39
        $this->add([
40
            'name' => 'code',
41
            'type' => \Laminas\Form\Element\Text::class,
42
            'attributes' => [
43
                'maxlength' 	=> 10,
44
                'id' 			=> 'code',
45
            ]
46
        ]);
47
 
48
        $this->add([
49
            'name' => 'order',
50
            'type' => \Laminas\Form\Element\Text::class,
51
            'attributes' => [
52
                'maxlength' 	=> 2,
53
                'id' 			=> 'order',
54
            ]
55
        ]);
56
 
57
        $this->add([
58
            'name' => 'status',
59
            'type' => \Laminas\Form\Element\Checkbox::class,
60
            'attributes' => [
61
                'id' 			=> 'status',
62
            ],
63
            'options' => [
64
                'use_hidden_element' => false,
65
                'unchecked_value' =>  \LeadersLinked\Model\HabitEmoji::STATUS_INACTIVE,
66
                'checked_value'=> \LeadersLinked\Model\HabitEmoji::STATUS_ACTIVE,
67
            ]
68
        ]);
69
 
70
 
71
 
72
 
73
 
74
    }
75
}