public function addFooter($content) { $footer = new HtmlDoubleElement("footer-" . $this->identifier); $footer->setTagName("div"); $footer->setClass("panel-footer"); $footer->setContent($content); $this->footer = $footer; return $this; }
public function createSpan($text, $position = "left") { $id = $position . "-" . $this->identifier; $span = new HtmlDoubleElement($id); $span->setTagName("span"); $this->setProperty("aria-describedby", $id); $span->setContent($text); $span->setClass("input-group-addon"); if (strtolower($position) === "left") { $this->addonLeft = $span; } else { $this->addonRight = $span; } return $span; }
public function addItem($text = "") { if (is_object($text)) { $element = $text; } else { switch ($this->tagName) { case "ul": $element = new HtmlDoubleElement("list-gi-" . $this->identifier); $element->setTagName("li"); break; default: $element = new HtmlLink("list-gi-" . $this->identifier); break; } $element->setContent($text); } $item = new HtmlListgroupItem($element); if (is_array($text) === true) { $item->setHeadingAndContent($text); } $this->content[] = $item; return $item; }
private function createIndicator() { $indicator = new HtmlDoubleElement("indicator-" . $this->identifier); $indicator->setProperty("data-target", "#" . $this->identifier); $indicator->setProperty("data-slide-to", sizeof($this->indicators)); $indicator->setTagName("li"); $this->indicators[] = $indicator; }
public function addGroup($identifier = "") { if ($identifier === "") { $identifier = "form-" . $this->identifier; } $group = new HtmlDoubleElement($identifier); $group->setTagName("div"); $group->setClass("form-group"); $this->formGroups[] = $group; return $group; }