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