Nip_Form_Renderer_Button_Input::generateItem()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 5
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
class Nip_Form_Renderer_Button_Input extends Nip_Form_Renderer_Button_Abstract
4
{
5
    public function generateItem()
6
    {
7
        $this->getItem()->setValue($this->getItem()->getLabel());
8
        $return = '<input ' . $this->renderAttributes() . ' />';
9
        return $return;
10
    }
11
12
    /**
13
     * @inheritDoc
14
     */
15
    public function getAllowedAttributes()
16
    {
17
        $attribs = parent::getAllowedAttributes();
18
        $attribs[] = 'type';
19
        $attribs[] = 'value';
20
        return $attribs;
21
    }
22
}
23