Proyectos de Subversion LeadersLinked - Backend

Rev

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

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