public function addHeader(array $header) { $this->addHead(); $row = new BaseNode("th"); foreach ($header as $item) { $rowContent = new basenode("td"); $rowContent->setText($item); $row->addChildren($rowContent); } $this->head->addChildren($row); }
public function __construct($for, $name = null) { parent::__construct("label"); $this->setProperty("for", $for); if ($name == null) { $name = $for; } $this->setText($name); }
public function __construct($id, $placeholder, $required = true) { parent::__construct("textarea", $id); $this->setProperty("placeholder", $placeholder); $this->setProperty("rows", "5"); if ($required) { $this->setAttribute("required"); } }
public function __construct($type, $id, $placeholder, $required = true) { parent::__construct("input", $id); $this->setProperty("placeholder", $placeholder); $this->setProperty("type", $type); if ($required) { $this->setAttribute("required"); } }
public function __construct($link, $text = null, $alt = null, $target = "_blank", $showText = true) { parent::__construct("a"); $this->link = $link; if ($showText) { if ($text == null) { $this->setText($link); } else { $this->setText($text); } } if ($alt == null) { $this->alt = $text; } else { $this->alt = $alt; } $this->target = $target; }
public function __construct() { parent::__construct("p"); }
public function __construct($id = null) { parent::__construct("div", $id); }
public function __construct($text, $id = null) { parent::__construct("button", $id); $this->setText($text); }