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
|
|
|
} |