Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 17055 | Rev 17057 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 17055 Rev 17056
Línea 3... Línea 3...
3
declare(strict_types=1);
3
declare(strict_types=1);
Línea 4... Línea 4...
4
 
4
 
Línea 5... Línea 5...
5
namespace LeadersLinked\Form\Microlearning;
5
namespace LeadersLinked\Form\Microlearning;
-
 
6
 
-
 
7
use Laminas\Form\Form;
-
 
8
use Laminas\Form\Element\Text;
-
 
9
use Laminas\Form\Element\Textarea;
6
 
10
use Laminas\Form\Element\Select;
7
use Laminas\Form\Form;
11
use Laminas\Form\Element\Hidden;
8
use Laminas\Db\Adapter\AdapterInterface;
12
use Laminas\Db\Adapter\AdapterInterface;
9
use Laminas\Log\LoggerInterface;
13
use Laminas\Log\LoggerInterface;
10
use LeadersLinked\Mapper\CompanySizeMapper;
14
use LeadersLinked\Mapper\CompanySizeMapper;
11
use LeadersLinked\Mapper\IndustryMapper;
15
use LeadersLinked\Mapper\IndustryMapper;
12
use LeadersLinked\Model\Feed;
16
use LeadersLinked\Model\Feed;
13
use LeadersLinked\Model\MicrolearningTopic;
17
use LeadersLinked\Model\MicrolearningTopic;
Línea 14... Línea -...
14
use LeadersLinked\Model\MicrolearningCapsule;
-
 
15
use LeadersLinked\Model\Company;
18
use LeadersLinked\Model\MicrolearningCapsule;
16
 
19
use LeadersLinked\Model\Company;
17
 
-
 
18
class CapsuleAddForm extends Form
20
 
19
{
21
class CapsuleAddForm extends Form
20
 
22
{
21
    public function __construct($internal = false) 
23
    public function __construct($internal = false) 
22
    {
-
 
Línea 23... Línea 24...
23
        parent::__construct();
24
    {
24
        $this->setInputFilter(new CapsuleAddFilter());
25
        parent::__construct();
25
 
26
        $this->setInputFilter(new CapsuleAddFilter());
26
        
27
        
27
        $this->add([
28
        $this->add([
28
            'name' => 'name',
29
            'name' => 'name',
29
            'type' => \Laminas\Form\Element\Textarea::class,
30
            'type' => Textarea::class,
Línea 30... Línea 31...
30
            'attributes' => [
31
            'attributes' => [
31
                'id'    => 'name',
32
                'id'    => 'name',
32
            ]
33
            ]
33
        ]);
34
        ]);
34
        
35
        
35
        $this->add([
36
        $this->add([
36
            'name' => 'description',
37
            'name' => 'description',
Línea 37... Línea 38...
37
            'type' => \Laminas\Form\Element\Textarea::class,
38
            'type' => Textarea::class,
38
            'attributes' => [
39
            'attributes' => [
39
                'id'    => 'description',
40
                'id'    => 'description',
40
            ]
41
            ]
41
        ]);
42
        ]);
42
        
43
        
43
        $this->add([
44
        $this->add([
Línea 44... Línea 45...
44
            'name' => 'order',
45
            'name' => 'order',
45
            'type' => \Laminas\Form\Element\Text::class,
46
            'type' => Text::class,
46
            'attributes' => [
47
            'attributes' => [
47
                'id'    => 'order',
48
                'id'    => 'order',
48
            ],
49
            ],
49
        ]);
50
        ]);
50
        
51
        
-
 
52
        $this->add([
51
        $this->add([
53
            'name' => 'file',
52
            'name' => 'file',
54
            'type' => Hidden::class,
53
            'type' => \Laminas\Form\Element\Hidden::class,
55
            'attributes' => [
54
            'attributes' => [
56
                'id' => 'file',
55
                'id' => 'file',
57
            ]
56
            ]
58
        ]);
57
        ]);
59
        
Línea 58... Línea -...
58
        $this->add([
-
 
59
            'name' => 'marketplace',
60
        $this->add([
60
            'type' => \Laminas\Form\Element\Hidden::class,
61
            'name' => 'marketplace',
61
            'attributes' => [
62
            'type' => Hidden::class,
62
                'id' => 'marketplace',
63
            'attributes' => [
63
            ]
64
                'id' => 'marketplace',
64
        ]);
65
            ]
65
        
66
        ]);
66
 
67
        
Línea 90... Línea 91...
90
            ];
91
            ];
91
        }
92
        }
Línea 92... Línea 93...
92
        
93
        
93
        $this->add([
94
        $this->add([
94
            'name' => 'privacy',
95
            'name' => 'privacy',
95
            'type' => \Laminas\Form\Element\Select::class,
96
            'type' => Select::class,
96
            'options' => [
97
            'options' => [
97
                'empty_option' => 'LABEL_PRIVACY',
98
                'empty_option' => 'LABEL_PRIVACY',
98
                'value_options' => $value_options,
99
                'value_options' => $value_options,
99
            ],
100
            ],
Línea 114... Línea 115...
114
            ];
115
            ];
115
        }
116
        }
Línea 116... Línea 117...
116
        
117
        
117
        $this->add([
118
        $this->add([
118
            'name' => 'type',
119
            'name' => 'type',
119
            'type' => \Laminas\Form\Element\Select::class,
120
            'type' => Select::class,
120
            'options' => [
121
            'options' => [
121
                'empty_option' => 'LABEL_TYPE',
122
                'empty_option' => 'LABEL_TYPE',
122
                'value_options' => $value_options,
123
                'value_options' => $value_options,
123
            ],
124
            ],
Línea 126... Línea 127...
126
            ]
127
            ]
127
        ]);
128
        ]);
Línea 128... Línea 129...
128
        
129
        
129
        $this->add([
130
        $this->add([
130
            'name' => 'cost',
131
            'name' => 'cost',
131
            'type' => \Laminas\Form\Element\Text::class,
132
            'type' => Text::class,
132
            'attributes' => [
133
            'attributes' => [
133
                'id'    => 'cost',
134
                'id'    => 'cost',
134
            ],
135
            ],
135
        ]);
-
 
136
        
136
        ]);
137
    }
137
    }