Proyectos de Subversion LeadersLinked - Backend

Rev

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