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 PostCreateForm extends Form
11
{
12
 
13
    public function __construct()
14
    {
15
        parent::__construct();
16
        $this->setInputFilter(new PostCreateFilter());
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
 
32
        $this->add([
33
            'name' => 'title',
34
            'type' => \Laminas\Form\Element\Text::class,
35
            'attributes' => [
36
                'maxlength' 	=> 128,
37
                'id' 			=> 'title',
38
            ]
39
        ]);
40
 
41
 
42
 
43
        $this->add([
44
            'name' => 'description',
45
            'type' => \Laminas\Form\Element\Textarea::class,
46
            'attributes' => [
47
                'id'    => 'description',
48
            ]
49
        ]);
50
 
51
        $this->add([
52
            'name' => 'url',
53
            'type' => \Laminas\Form\Element\Url::class,
54
            'attributes' => [
55
                'maxlength' 	=> 250,
56
                'id' 			=> 'url',
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
}