Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 4113 | Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 www 1
<?php
2
 
3
declare(strict_types=1);
4
 
5
namespace LeadersLinked\Form\AccountSetting;
6
 
7
use Laminas\Form\Form;
8
use Laminas\Db\Adapter\AdapterInterface;
9
use LeadersLinked\Mapper\SkillMapper;
10
use LeadersLinked\Model\User;
11
 
12
class BasicForm extends Form
13
{
14
    public function __construct()
15
    {
16
        parent::__construct();
17
        $this->setInputFilter(new BasicFilter());
18
 
19
        $this->add([
20
            'name' => 'phone',
21
            'type' => \Laminas\Form\Element\Text::class,
22
            'attributes' => [
23
                'maxlength' 	=> 18,
24
                'id' 			=> 'phone',
25
            ]
26
        ]);
27
 
28
        $this->add([
29
            'name' => 'first_name',
30
            'type' => \Laminas\Form\Element\Hidden::class,
31
            'attributes' => [
32
                'id'    => 'first_name',
33
            ]
34
        ]);
35
 
36
        $this->add([
37
            'name' => 'last_name',
38
            'type' => \Laminas\Form\Element\Hidden::class,
39
            'attributes' => [
40
                'id'    => 'last_name',
41
            ]
42
        ]);
43
 
44
        $this->add([
45
            'name' => 'gender',
46
            'type' => \Laminas\Form\Element\Select::class,
47
            'options' => [
48
                'value_options' =>  [
49
                    User::GENDER_FEMALE => 'LABEL_FEMALE',
50
                    User::GENDER_MALE => 'LABEL_MALE'
51
                ],
52
            ],
53
            'attributes' => [
54
                'id' => 'gender',
55
            ]
56
        ]);
57
 
58
        $this->add([
59
            'name' => 'email',
60
            'type' => \Laminas\Form\Element\Text::class,
61
            'attributes' => [
62
                'maxlength' 	=> 250,
63
                'id' 			=> 'email',
64
            ]
65
        ]);
66
    }
67
 
68
}