FormElementFile::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 5
rs 10
1
<?php
2
3
namespace Alfs18\User\HTMLForm;
4
// namespace Anax\HTMLForm;
5
6
use Anax\HTMLForm\FormElementInput;
7
8
/**
9
 * Form element
10
 */
11
class FormElementFile extends FormElementInput
12
{
13
    /**
14
     * Constructor
15
     *
16
     * @param string $name       of the element.
17
     * @param array  $attributes to set to the element. Default is an empty
18
     *                           array.
19
     */
20
    public function __construct($name, $attributes = [])
21
    {
22
        parent::__construct($name, $attributes);
23
        $this['type'] = 'file';
24
        $this->UseNameAsDefaultLabel();
25
    }
26
}
27