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

Slider   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 10
c 0
b 0
f 0
dl 0
loc 36
ccs 0
cts 16
cp 0
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getFilterField() 0 3 1
A getProperties() 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\form\fields\Text;
13
use neon\core\helpers\Arr;
14
use neon\core\helpers\Html;
15
16
class Slider extends Real
17
{
18
	public $height = 100;
19
	public $vertical = false;
20
	public $min = 0;
21
	public $max = 10;
22
23
	/**
24
	 * @inheritdoc
25
	 */
26
	public function getProperties()
27
	{
28
		return array_merge(parent::getProperties(), ['decimal', 'height', 'vertical', 'min', 'max'] );
29
	}
30
	/**
31
	 * @inheritdoc
32
	 */
33
	public function registerScripts($view)
34
	{
35
		ElAsset::register($view);
36
	}
37
	/**
38
	 * @inheritdoc
39
	 */
40
	public function getFilterField()
41
	{
42
		return ['class' => 'real', 'decimal'=>1];
43
	}
44
45
	/**
46
	 * @inheritdoc
47
	 */
48
	public function getComponentDetails()
49
	{
50
		return [
51
			'icon' => 'fa fa-registered"', 'group' => 'Number', 'order' => 550
52
		];
53
	}
54
}