34 parent::__construct(
$identifier,
"button",
"ui button");
35 $this->content = $value;
36 if (isset($cssStyle)) {
39 if (isset($onClick)) {
51 if (is_array($this->content)) {
52 foreach ($this->content as $i =>
$content) {
54 $this->content[$i] = $value;
59 $this->content = $value;
86 $visible->setClass(
"visible content");
87 $visible->setContent($this->content);
89 $hidden->setClass(
"hidden content");
91 $this->content = array(
105 if (\is_string($icon)) {
106 $iconO =
new HtmlIcon(
"icon-" . $this->identifier, $icon);
109 $this->content = $iconO;
126 public function addLabel($label, $before =
false, $icon = NULL) {
127 $this->tagName =
"div";
132 $isIcon = (isset($this->content[0]) && $this->content[0] instanceof
HtmlIcon);
133 $this->content =
new HtmlButton(
"button-" . $this->identifier, $this->content);
135 $this->content->addClass(
"icon");
137 $this->content->setTagName(
"div");
138 $label =
new HtmlLabel(
"label-" . $this->identifier, $label, $icon,
"a");
149 $array = parent::fromArray($array);
150 foreach ($array as $key => $value) {
166 if (\is_array($this->content)) {
167 foreach ($this->content as
$content) {
169 $content->setColor($color);
191 $this->
onCreate(
"$('#" . $this->identifier .
"').state();");
230 $value = \ucfirst($social);
232 $return->addIcon($social);
247 $result->addIcon($icon, $before,
true);
260 $result->asIcon($icon);
269 public function asLink($href = NULL, $target = NULL) {
270 parent::asLink($href, $target);
288 $dd = $result->addDropdown($items, $asCombo);
297 'message' =>
new HtmlSemDoubleElement(
'popup-confirm-message-' . $this->_identifier,
'p',
'', $message)
addToProperty($name, $value, $separator=" ")
addPopupHtml($html="", $variation=NULL, $params=array())
Adds an html popup to the element.
Semantic Label component.
addContent($content, $before=false)
setProperty($name, $value)
onClick($jsCode, $stopPropagation=false, $preventDefault=true)
Base class for Semantic double elements.
addToPropertyCtrl($name, $value, $typeCtrl)