Completed
Push — master ( b23d1e...03b6f4 )
by Jean-Christophe
04:33
created

Modal   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 2
cbo 1
dl 0
loc 22
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setBehavior() 0 4 1
A showDimmer() 0 3 1
A setInverted() 0 3 1
1
<?php
2
3
namespace Ajax\semantic\components;
4
5
use Ajax\JsUtils;
6
7
class Modal extends SimpleSemExtComponent {
8
9
	public function __construct(JsUtils $js) {
10
		parent::__construct($js);
11
		$this->uiName="modal";
12
	}
13
14
	protected function setBehavior($name) {
15
		$this->paramParts[]=[$name];
16
		return $this;
17
	}
18
19
	public function showDimmer(){
20
		return $this->setBehavior("hide dimmer");
21
	}
22
23
	public function setInverted(){
24
		$this->params["inverted"]=true;
25
	}
26
27
	// TODO other events implementation
28
}