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

Textarea::render()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 6
rs 10
c 1
b 0
f 0
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