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\Microlearning;
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
use LeadersLinked\Model\Feed;
13
use LeadersLinked\Model\MicrolearningTopic;
14
 
15
class TopicAddForm extends Form
16
{
17
 
18
    public function __construct()
19
    {
20
        parent::__construct();
21
        $this->setInputFilter(new TopicAddFilter());
22
 
23
 
24
        $this->add([
25
            'name' => 'name',
26
            'type' => \Laminas\Form\Element\Textarea::class,
27
            'attributes' => [
28
                'id'    => 'name',
29
            ]
30
        ]);
31
 
32
        $this->add([
33
            'name' => 'description',
34
            'type' => \Laminas\Form\Element\Textarea::class,
35
            'attributes' => [
36
                'id'    => 'description',
37
            ]
38
        ]);
39
 
40
        $this->add([
41
            'name' => 'order',
42
            'type' => \Laminas\Form\Element\Text::class,
43
            'attributes' => [
44
                'id'    => 'order',
45
            ],
46
        ]);
47
 
48
        $this->add([
49
            'name' => 'file',
50
            'type' => \Laminas\Form\Element\Hidden::class,
51
            'attributes' => [
52
                'id' => 'file',
53
            ]
54
        ]);
55
 
56
 
57
 
58
        $this->add([
59
            'name' => 'status',
60
            'type' => \Laminas\Form\Element\Select::class,
61
            'options' => [
62
                'empty_option' => 'LABEL_STATUS',
63
                'value_options' => [
64
                    MicrolearningTopic::STATUS_ACTIVE => 'LABEL_ACTIVE',
65
                    MicrolearningTopic::STATUS_INACTIVE => 'LABEL_INACTIVE',
66
                ],
67
            ],
68
            'attributes' => [
69
                'id' => 'status',
70
            ]
71
        ]);
72
 
73
 
74
 
75
 
76
    }
77
}