Completed
Branch master (856cc5)
by Mihail
07:21 queued 04:29
created

EmailField::make()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
namespace Ffcms\Core\Helper\HTML\Form;
3
4
use Ffcms\Core\Helper\HTML\System\NativeGenerator;
5
6
class EmailField extends NativeGenerator implements iField
7
{
8
    private $properties;
9
    private $name;
10
11
    /**
12
     * EmailField constructor. Pass attributes inside model.
13
     * @param array $properties
14
     * @param string $name
15
     * @param string|null $value
16
     */
17
    public function __construct($properties, $name, $value = null)
18
    {
19
        $this->properties = $properties;
20
        $this->name = $name;
21
    }
22
    
23
24
    /**
25
     * Build <input type="password" {$properties} /> response
26
     * {@inheritDoc}
27
     * @see \Ffcms\Core\Helper\HTML\Form\iField::make()
28
     */
29
    public function make()
30
    {
31
        $this->properties['type'] = 'email';
32
        
33
        return self::buildSingleTag('input', $this->properties);
34
    }
35
}