phpMv  -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
HtmlSegmentGroups.php
Go to the documentation of this file.
1 <?php
2 
4 
8 use Ajax\JsUtils;
9 
11 
12 
13  public function __construct( $identifier, $items=array()){
14  parent::__construct( $identifier, "div","ui segments");
15  $this->addItems($items);
16  }
17 
18 
19  protected function createItem($value){
20  return new HtmlSegment("segment-".$this->count(),$value);
21  }
22 
23  protected function createCondition($value){
24  return !($value instanceof HtmlSegment);
25  }
26 
32  public function setType($type){
33  return $this->addToPropertyCtrl("class", $type, SegmentType::getConstants());
34  }
35 
36  public function setSens($sens=Sens::VERTICAL){
37  return $this->addToPropertyCtrl("class", $sens, Sens::getConstants());
38  }
39 
40  public function run(JsUtils $js){
41  $result= parent::run($js);
42  return $result->setItemSelector(".ui.segment");
43  }
44 
45  public static function group($identifier,$items=array(),$type="",$sens=Sens::VERTICAL){
46  $group=new HtmlSegmentGroups($identifier,$items);
47  $group->setSens($sens);
48  return $group->setType($type);
49  }
50 
51 }
static group($identifier, $items=array(), $type="", $sens=Sens::VERTICAL)
static getConstants()
Definition: BaseEnum.php:17
Semantic Segment element.
Definition: HtmlSegment.php:20
Base class for Semantic Html collections.
JQuery PHP library.
Definition: JsUtils.php:23
addToPropertyCtrl($name, $value, $typeCtrl)