1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Ajax\semantic\html\elements; |
4
|
|
|
|
5
|
|
|
use Ajax\common\html\HtmlDoubleElement; |
6
|
|
|
/** |
7
|
|
|
* Semantic UI divider component |
8
|
|
|
* @see http://semantic-ui.com/elements/divider.html |
9
|
|
|
* @author jc |
10
|
|
|
* @version 1.001 |
11
|
|
|
*/ |
12
|
|
|
class HtmlDivider extends HtmlDoubleElement { |
13
|
|
|
|
14
|
|
|
public function __construct($identifier, $content="",$tagName="div") { |
15
|
|
|
parent::__construct($identifier, $tagName); |
16
|
|
|
$this->setClass("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->addToPropertyUnique("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->addToPropertyUnique("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
|
|
|
* @return \Ajax\semantic\html\elements\HtmlDivider |
54
|
|
|
*/ |
55
|
|
|
public function asHeader(){ |
56
|
|
|
return $this->addToProperty("class", "header"); |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* inverts the divider colors |
61
|
|
|
* @return \Ajax\semantic\html\elements\HtmlDivider |
62
|
|
|
*/ |
63
|
|
|
public function setInverted(){ |
64
|
|
|
return $this->addToProperty("class", "inverted"); |
65
|
|
|
} |
66
|
|
|
} |