Proyectos de Subversion LeadersLinked - Services

Rev

Rev 283 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
345 www 2
declare(strict_types = 1);
1 efrain 3
namespace LeadersLinked\Form\Users;
4
 
5
use Laminas\Form\Form;
6
use LeadersLinked\Model\UserType;
7
 
8
class AddForm extends Form
9
{
345 www 10
 
1 efrain 11
    /**
345 www 12
     *
1 efrain 13
     * @param array $config
14
     */
345 www 15
    public function __construct($adapter)
1 efrain 16
    {
17
        parent::__construct();
18
        $this->setInputFilter(new AddFilter($adapter));
345 www 19
 
1 efrain 20
        $this->add([
21
            'name' => 'first_name',
22
            'type' => \Laminas\Form\Element\Text::class,
345 www 23
            'attributes' => [
24
                'maxlength' => 64,
25
                'id' => 'first_name'
1 efrain 26
            ]
345 www 27
        ]);
28
        $this->add([
1 efrain 29
            'name' => 'last_name',
30
            'type' => \Laminas\Form\Element\Text::class,
31
            'attributes' => [
345 www 32
                'maxlength' => 64,
33
                'id' => 'last_name'
1 efrain 34
            ]
35
        ]);
345 www 36
        $this->add([
1 efrain 37
            'name' => 'email',
38
            'type' => \Laminas\Form\Element\Text::class,
39
            'attributes' => [
345 www 40
                'maxlength' => 250,
41
                'id' => 'email'
1 efrain 42
            ]
43
        ]);
345 www 44
        $this->add([
45
            'name' => 'password',
46
            'type' => \Laminas\Form\Element\Text::class,
47
            'attributes' => [
48
                'maxlength' => 25,
49
                'id' => 'password'
50
            ]
51
        ]);
52
        $this->add([
53
            'name' => 'confirmation',
54
            'type' => \Laminas\Form\Element\Text::class,
55
            'attributes' => [
56
                'maxlength' => 25,
57
                'id' => 'confirmation'
58
            ]
59
        ]);
1 efrain 60
    }
61
}