Completed
Push — master ( 2aad8b...141d55 )
by Jean-Christophe
03:21
created

HtmlDivider::setHorizontal()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Ajax\semantic\html\elements;
4
5
use Ajax\semantic\html\base\HtmlSemDoubleElement;
6
7
/**
8
 * Semantic UI divider component
9
 * @see http://semantic-ui.com/elements/divider.html
10
 * @author jc
11
 * @version 1.001
12
 */
13
class HtmlDivider extends HtmlSemDoubleElement {
14
15
	public function __construct($identifier, $content="", $tagName="div") {
16
		parent::__construct($identifier, $tagName, "ui divider");
17
		$this->content=$content;
18
	}
19
20
	/**
21
	 * vertical divider
22
	 * @return \Ajax\semantic\html\elements\HtmlDivider
23
	 */
24
	public function setVertical() {
25
		return $this->addToPropertyCtrl("class", "vertical", array ("vertical","horizontal" ));
26
	}
27
28
	/**
29
	 * horizontal divider
30
	 * @return \Ajax\semantic\html\elements\HtmlDivider
31
	 */
32
	public function setHorizontal() {
33
		return $this->addToPropertyCtrl("class", "horizontal", array ("vertical","horizontal" ));
34
	}
35
36
	/**
37
	 * hide the divider
38
	 * @return \Ajax\semantic\html\elements\HtmlDivider
39
	 */
40
	public function setHidden() {
41
		return $this->addToProperty("class", "hidden");
42
	}
43
44
	/**
45
	 * fitted, without any space above or below it
46
	 * @return \Ajax\semantic\html\elements\HtmlDivider
47
	 */
48
	public function setFitted() {
49
		return $this->addToProperty("class", "fitted");
50
	}
51
52
	/**
53
	 *
54
	 * @return \Ajax\semantic\html\elements\HtmlDivider
55
	 */
56
	public function asHeader() {
57
		return $this->addToProperty("class", "header");
58
	}
59
60
	/**
61
	 * inverts the divider colors
62
	 * @return \Ajax\semantic\html\elements\HtmlDivider
63
	 */
64
	public function setInverted() {
65
		return $this->addToProperty("class", "inverted");
66
	}
67
68
	public function setIgnored(){
69
		return $this->addToProperty("class", "ignored");
70
	}
71
}