public function getHtmlAttributes() { $attrArr = []; foreach ($this->attributes as $name => $val) { $attrArr[] = "{$name}=\"{$val}\""; } return implode(' ', $attrArr); }