protected function renderLabel(Element $element) { $label = $element->getLabel(); if (!empty($label)) { echo '<label class="col-sm-2 control-label" for="' . $element->getAttribute("id") . '">'; echo $label . '</label>'; } }
protected function getLabel(Element $element) { $html = ''; $label = $element->getLabel(); if (!empty($label)) { $html .= '<label class="col-sm-2 control-label" for="' . $element->getAttribute("id") . '">'; $html .= $label . '</label>'; } return $html; }
protected function renderLabel(Element $element) { $label = $element->getLabel(); echo '<label for="', $element->getAttribute("id"), '">'; if (!empty($label)) { if ($element->isRequired()) { echo '<span class="required">* </span>'; } echo $label; } echo '</label>'; }
protected function getLabel(Element $element) { $html = ''; $label = $element->getLabel(); if (!empty($label)) { $html .= '<label for="' . $element->getAttribute("id") . '">'; if ($element->isRequired()) { $html .= '<span class="required">* </span>'; } $html .= $label; $html .= '</label>'; } return $html; }
public function __construct($name, $value = "", array $properties = null) { if (!is_array($properties)) { $properties = array(); } if (!empty($value)) { $properties["value"] = $value; } parent::__construct("", $name, $properties); }
public function render() { $addons = array(); if (!empty($this->prepend)) { $addons[] = "input-prepend"; } if (!empty($this->append)) { $addons[] = "input-append"; } if (!empty($addons)) { echo '<div class="', implode(" ", $addons), '">'; } $this->renderAddOn("prepend"); parent::render(); $this->renderAddOn("append"); if (!empty($addons)) { echo '</div>'; } }
public function getInput() { $html = ''; $addons = array(); if (!empty($this->prepend)) { $addons[] = "input-prepend"; } if (!empty($this->append)) { $addons[] = "input-append"; } if (!empty($addons)) { $html .= '<div class="' . implode(" ", $addons) . '">'; } $html .= $this->getAddOn("prepend"); $html .= parent::getInput(); $html .= $this->getAddOn("append"); if (!empty($addons)) { $html .= '</div>'; } return $html; }
public function __construct($label = "Submit", $type = "", array $properties = null) { if (!is_array($properties)) { $properties = array(); } if (!empty($type)) { $properties["type"] = $type; } $class = "btn"; if (empty($type) || $type == "submit") { $class .= " btn-primary"; } if (!empty($properties["class"])) { $properties["class"] .= " " . $class; } else { $properties["class"] = $class; } if (empty($properties["value"])) { $properties["value"] = $label; } parent::__construct("", "", $properties); }
public function __construct($label = "", array $properties = null) { parent::__construct($label, "recaptcha_response_field", $properties); }
public function __construct($value) { $properties = array("value" => $value); parent::__construct("", "", $properties); }