Passed
Pull Request — master (#15)
by Anton
03:20
created

Admin   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 6
dl 0
loc 35
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 26 1
1
<?php
2
3
/**
4
 * @package Cadmium\System\Modules\Settings
5
 * @author Anton Romanov
6
 * @copyright Copyright (c) 2015-2017, Anton Romanov
7
 * @link http://cadmium-cms.com
8
 */
9
10
namespace Modules\Settings\Form {
11
12
	use Modules\Extend, Modules\Settings, Utils\Form, Utils\Range;
13
14
	class Admin extends Form {
15
16
		protected $name = 'settings';
17
18
		/**
19
		 * Constructor
20
		 */
21
22
		public function __construct() {
23
24
			# Admin language
25
26
			$languages = Extend\Languages::loader(SECTION_ADMIN);
27
28
			$this->addSelect('admin_language', $languages->active(), $languages->items(true));
29
30
			# Admin template
31
32
			$templates = Extend\Templates::loader(SECTION_ADMIN);
33
34
			$this->addSelect('admin_template', $templates->active(), $templates->items(true));
35
36
			# Admin display entities
37
38
			$this->addSelect('admin_display_entities', Settings::get('admin_display_entities'),
39
40
				Range\Display\Entities::getRange());
41
42
			# Admin display files
43
44
			$this->addSelect('admin_display_files', Settings::get('admin_display_files'),
45
46
				Range\Display\Files::getRange());
47
		}
48
	}
49
}
50