Passed
Branch main (e68017)
by James Ekow Abaka
10:11
created

Textarea   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
dl 0
loc 15
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A render() 0 6 1
1
<?php
2
3
4
namespace ntentan\honam\engines\php\helpers\form;
5
6
class Textarea extends Field
7
{
8
    public function __construct($label="",$name="",$description="")
9
    {
10
        $this->setLabel($label);
11
        $this->setName($name);
12
        $this->setDescription($description);
13
    }
14
15
    public function render()
16
    {
17
        $this->setAttribute('rows', 10);
18
        $this->setAttribute('cols', 80);
19
        $this->setAttribute('name', $this->getName());
20
        return $this->templateRenderer->render("textarea_element.tpl.php", ['element' => $this]);
21
    }
22
}
23