Component_textarea::default_model()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 15
Code Lines 12

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 12
nc 1
nop 0
dl 0
loc 15
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Amarkal\UI;
4
5
/**
6
 * Implements a Textarea UI component.
7
 */
8
class Component_textarea
9
extends AbstractComponent
0 ignored issues
show
Coding Style introduced by
The extends keyword must be on the same line as the class name
Loading history...
10
implements ValueComponentInterface, 
0 ignored issues
show
Coding Style introduced by
The implements keyword must be on the same line as the class name
Loading history...
Coding Style introduced by
The first item in a multi-line implements list must be on the line following the implements keyword
Loading history...
11
           DisableableComponentInterface,
0 ignored issues
show
Coding Style introduced by
Expected 4 spaces before interface name; 11 found
Loading history...
12
           FilterableComponentInterface,
0 ignored issues
show
Coding Style introduced by
Expected 4 spaces before interface name; 11 found
Loading history...
13
           ValidatableComponentInterface
0 ignored issues
show
Coding Style introduced by
Expected 4 spaces before interface name; 11 found
Loading history...
14
{
15
    public $component_type = 'textarea';
16
    
17
    public function default_model() 
18
    {
19
        return array(
20
            'name'          => '',
21
            'id'            => null,
22
            'disabled'      => false,
23
            'required'      => false,
24
            'readonly'      => false,
25
            'rows'          => 5,
26
            'default'       => '',
27
            'filter'        => null,
28
            'validation'    => null,
29
            'show'          => null
30
        );
31
    }
32
    
33
    public function required_arguments()
34
    {
35
        return array('name');
36
    }
37
    
38
    public function get_template_path() 
39
    {
40
        return __DIR__.'/template.phtml';
41
    }
42
}