Proyectos de Subversion LeadersLinked - Backend

Rev

| Ultima modificación | Ver Log |

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