public function addPointingLabel($label, $pointing = Direction::NONE) { $labelO = new HtmlLabel("", $label); $labelO->setPointing($pointing); $this->addContent($labelO, $pointing === "below" || $pointing === "right"); return $labelO; }
public function addLabel($label, $before = false, $icon = NULL) { $labelO = $label; if (\is_object($label) === false) { $labelO = new HtmlLabel("label-" . $this->identifier, $label); if (isset($icon)) { $labelO->addIcon($icon); } } else { $labelO->addToPropertyCtrl("class", "label", array("label")); } $this->addContent($labelO, $before); return $labelO; }
/** * Add and return a button label * @param string $caption * @param string $before * @param string $icon * @return \Ajax\semantic\html\elements\HtmlLabel */ public function addLabel($label, $before = false, $icon = NULL) { $this->tagName = "div"; $this->addToProperty("class", "labeled"); $this->content = new HtmlButton("button-" . $this->identifier, $this->content); $this->content->setTagName("div"); $label = new HtmlLabel("label-" . $this->identifier, $label, "a"); if (isset($icon)) { $label->addIcon($icon); } $label->setBasic(); $this->addContent($label, $before); return $label; }