33 parent::__construct(
$identifier,
"button",
"ui button");
34 $this->content = $value;
35 if (isset($cssStyle)) {
38 if (isset($onClick)) {
50 if (is_array($this->content)) {
51 foreach ($this->content as $i =>
$content) {
53 $this->content[$i] = $value;
58 $this->content = $value;
85 $visible->setClass(
"visible content");
86 $visible->setContent($this->content);
88 $hidden->setClass(
"hidden content");
90 $this->content = array(
104 if (\is_string($icon)) {
105 $iconO =
new HtmlIcon(
"icon-" . $this->identifier, $icon);
108 $this->content = $iconO;
125 public function addLabel($label, $before =
false, $icon = NULL) {
126 $this->tagName =
"div";
131 $isIcon = (isset($this->content[0]) && $this->content[0] instanceof
HtmlIcon);
132 $this->content =
new HtmlButton(
"button-" . $this->identifier, $this->content);
134 $this->content->addClass(
"icon");
136 $this->content->setTagName(
"div");
137 $label =
new HtmlLabel(
"label-" . $this->identifier, $label, $icon,
"a");
148 $array = parent::fromArray($array);
149 foreach ($array as $key => $value) {
165 if (\is_array($this->content)) {
166 foreach ($this->content as
$content) {
171 parent::setColor($color);
190 $this->
onCreate(
"$('#" . $this->identifier .
"').state();");
229 $value = \ucfirst($social);
231 $return->addIcon($social);
246 $result->addIcon($icon, $before,
true);
259 $result->asIcon($icon);
268 public function asLink($href = NULL, $target = NULL) {
269 parent::asLink($href, $target);
287 $dd = $result->addDropdown($items, $asCombo);
296 'message' =>
new HtmlSemDoubleElement(
'popup-confirm-message-' . $this->_identifier,
'p',
'', $message)
onClick($jsCode, $stopPropagation=false, $preventDefault=true)
Base class for Semantic double elements.
addPopupHtml($html="", $variation=NULL, $params=array())
Adds an html popup to the element.
addToPropertyCtrl($name, $value, $typeCtrl)
setProperty($name, $value)
addToProperty($name, $value, $separator=" ")
addContent($content, $before=false)
Semantic Label component.