Base   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 23
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setInputId() 0 3 1
A setReadOnly() 0 3 1
1
<?php
2
/**
3
 * ExtForms - Base.php
4
 *
5
 * Initial version by: MisterX
6
 * Initial version created on: 31.07.2015
7
 */
8
9
namespace Ext\Form\Field;
10
11
12
use Ext\Component;
13
use Ext\Form\Labelable;
14
use Ext\Form\LabelableInterface;
15
16
abstract class Base extends Component implements FieldInterface,LabelableInterface
0 ignored issues
show
Coding Style introduced by
Expected 1 space before "LabelableInterface"; 0 found
Loading history...
17
{
18
	use Field, Labelable;
19
20
	/**
21
	 * The id that will be given to the generated input DOM element. Defaults to an automatically generated id.
22
	 * If you configure this manually, you must make sure it is unique in the document.
23
	 * @param $inputId
24
	 * @return $this
25
	 */
26
	public function setInputId($inputId){
27
		return $this->setProperty('inputId',$inputId);
28
	}
29
30
	/**
31
	 * true to mark the field as readOnly in HTML.
32
	 * @param $readOnly
33
	 * @return $this
34
	 */
35
	public function setReadOnly($readOnly){
36
		return $this->setProperty('readOnly',(bool)$readOnly);
37
	}
38
}