phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlSegment.php
Go to the documentation of this file.
1<?php
2
4
13
21
22 public function __construct($identifier, $content="") {
23 parent::__construct($identifier, "div", "ui segment");
24 $this->_variations=\array_merge($this->_variations, [ Variation::PADDED,Variation::COMPACT ]);
25 $this->_states=\array_merge($this->_states, [ State::LOADING ]);
26 $this->content=$content;
27 }
28
34 public function setType($type) {
35 return $this->addToPropertyCtrl("class", $type, SegmentType::getConstants());
36 }
37
38 public function setSens($sens="vertical") {
39 return $this->addToPropertyCtrl("class", $sens, array ("vertical","horizontal" ));
40 }
41
42 public function setEmphasis($value=Emphasis::SECONDARY) {
43 return $this->addToPropertyCtrl("class", $value, Emphasis::getConstants());
44 }
45
46 public function setCircular() {
47 return $this->addToProperty("class", "circular");
48 }
49
50 public function clear() {
51 return $this->addToProperty("class", "clearing");
52 }
53
54 public function setCompact() {
55 return $this->addToProperty("class", "compact");
56 }
57
58 public function setBasic() {
59 return $this->setProperty("class", "ui basic segment");
60 }
61
62 public function asContainer() {
63 return $this->addToPropertyCtrl("class", "container", array ("container" ));
64 }
65
66 public function addGrid($numRows=1, $numCols=NULL){
67 $grid=new HtmlGrid("Grid-".$this->identifier,$numRows,$numCols);
68 $this->content=$grid;
69 return $grid;
70 }
71}
Base class for Semantic double elements.
addToPropertyCtrl($name, $value, $typeCtrl)
addToProperty($name, $value, $separator=" ")
setEmphasis($value=Emphasis::SECONDARY)
addGrid($numRows=1, $numCols=NULL)
__construct($identifier, $content="")
setType($type)
Defines the segment type.