Passed
Push — neill-raw-html ( ...7df3e8 )
by Neill
22:14
created

Number   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 6
c 0
b 0
f 0
dl 0
loc 28
ccs 0
cts 12
cp 0
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getFieldHtml() 0 3 1
A registerScripts() 0 3 1
A getComponentDetails() 0 4 1
1
<?php
2
/**
3
 * @link http://www.newicon.net/neon
4
 * @copyright Copyright (c) 21/09/2016 Newicon Ltd
5
 * @license http://www.newicon.net/neon/license/
6
 */
7
8
namespace neon\core\form\fields\el;
9
10
use neon\core\form\fields\el\assets\ElAsset;
11
use neon\core\form\fields\Real;
12
use neon\core\helpers\Html;
13
14
class Number extends Real
15
{
16
	/**
17
	 * The DDS data type to store the value of the field
18
	 * @var string
19
	 */
20
	public $ddsDataType = 'real';
21
22
	public function registerScripts($view)
23
	{
24
		ElAsset::register($view);
25
	}
26
27
	/**
28
	 * @inheritdoc
29
	 */
30
	public function getFieldHtml()
31
	{
32
		return Html::tag('el-input-number', '', ['name'=>$this->getInputName()]);
33
	}
34
35
	/**
36
	 * @inheritdoc
37
	 */
38
	public function getComponentDetails()
39
	{
40
		return [
41
			'Number', 'icon' => 'fa fa-italic"', 'group' => 'Number', 'order' => 520
42
		];
43
	}
44
45
}