20 parent::__construct(
$identifier,
"div",
"ui buttons");
21 if ($asIcons ===
true)
35 $dd=
new HtmlDropdown(
"dd-".$this->identifier,
null,$items);
38 $dd->setAction(
"combo");
39 $dd->addToProperty(
"class",
"combo");
54 $item->asIcon($element);
59 foreach ( $elements as $element ) {
65 public function insertOr($aferIndex=0, $or=
"or") {
67 $orElement->setProperty(
"data-text", $or);
68 array_splice($this->content, $aferIndex + 1, 0, array ($orElement ));
81 foreach ( $this->content as $item ) {
83 $item->asIcon($item->getContent());
94 foreach ( $this->content as $index=>$item ) {
95 if($item instanceof
HtmlButton && isset($icons[$index]))
96 $item->addIcon($icons[$index]);
115 return parent::getItem($index);
122 return parent::getItem($index);
126 $this->
setItem($index, $button);
134 public function on($event, $jsCode, $stopPropagation=
false, $preventDefault=
false) {
135 foreach ( $this->content as $element ) {
136 $element->on($event, $jsCode, $stopPropagation, $preventDefault);
147 if(!\is_array($classes)){
148 $classes=array_fill (0,$this->
count(),$classes);
150 foreach ( $this->content as $button ) {
151 $button->addToProperty(
"class", $classes[$i++]);
165 $result= parent::run($js);
166 return $result->setItemSelector(
".ui.button");
addItem($item)
adds and returns an item
Base class for Semantic Html collections.
Base class for Semantic double elements.
addToProperty($name, $value, $separator=" ")