Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 17112 | | Comparar con el anterior | 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
 
9
class TopicForm extends Form
10
{
11
 
17110 stevensc 12
    public function __construct($adapter){
17002 efrain 13
        parent::__construct();
17087 stevensc 14
        $this->setInputFilter(new TopicFilter($adapter));
17002 efrain 15
 
16
         $this->add([
17
            'name' => 'title',
18
            'type' => \Laminas\Form\Element\Text::class,
19
            'attributes' => [
20
                'maxlength' 	=> 128,
21
                'id' 			=> 'title',
22
            ]
23
        ]);
24
 
25
       $this->add([
26
            'name' => 'description',
27
            'type' => \Laminas\Form\Element\Textarea::class,
28
            'attributes' => [
29
                'id'    => 'description',
30
            ]
31
        ]);
32
 
33
        $this->add([
34
            'name' => 'status',
35
            'type' => \Laminas\Form\Element\Checkbox::class,
36
            'attributes' => [
37
                'id' 			=> 'status',
38
            ],
39
            'options' => [
40
                'use_hidden_element' => false,
41
                'unchecked_value' => \LeadersLinked\Model\Topic::STATUS_INACTIVE,
42
                'checked_value'=> \LeadersLinked\Model\Topic::STATUS_ACTIVE,
43
            ]
44
        ]);
45
    }
46
}
47