Passed
Push — master ( a82a12...289cbe )
by Anton
03:10
created

Edit::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * @package Cadmium\System\Modules\Filemanager
5
 * @author Anton Romanov
6
 * @copyright Copyright (c) 2015-2017, Anton Romanov
7
 * @link http://cadmium-cms.com
8
 */
9
10
namespace Modules\Filemanager\Form {
11
12
	use Modules\Filemanager, Utils\Form, Language;
13
14
	class Edit extends Form {
15
16
		protected $name = 'edit';
17
18
		/**
19
		 * Constructor
20
		 */
21
22
		public function __construct(Filemanager\Utils\Entity $entity, bool $enabled = true) {
23
24
			$this->addText('contents', $entity->getContents(), FORM_FIELD_TEXTAREA, 0,
25
26
				['multiline' => true, 'codestyle' => true, 'disabled' => !$enabled]);
27
		}
28
	}
29
}
30